Closed (fixed)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Plugins
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Jun 2017 at 14:19 UTC
Updated:
3 Oct 2019 at 17:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kevineinarsson commentedComment #3
kristofferwiklund commentedLooks good.
Comment #4
drunken monkeyThanks a lot for reporting this issue and providing a patch!
Sorry I didn't respond earlier – this issue appears to have slipped through the cracks in my inbox. (I haven't figured out yet why this keeps happening now and again.) In the future, please feel free to ping me via mail, contact form or IRC when I don't reply to any new issue within a month or so.
Anyways, regarding the patch, it looks basically good, but will fail if someone runs PHP without the mbstring extension enabled (which is possible in Drupal). We'll have to check whether the function actually exists before using it.
Revised patch attached, please test whether it still works for you.
Comment #6
drunken monkeyOoops …
Comment #8
drunken monkeyCommitted.
Thanks again!
Comment #10
ciss commentedSorry to be such a gravedigger, but wouldn't it be more efficient to test for, and store, the function name outside of the while loop instead of retesting in every single iteration?
Edit: Apparently this change got erased in 27b6cbb6f (#2990940: Excerpt is not shown when the indexed text is not in English).