Missing argument 3 for SearchIndex::substr()
pixelninja opened this issue · 2 comments
When searching for a term that has a -
in the string, it returns the error Missing argument 3 for SearchIndex::substr(), called in /usr/home/sites/clampline.com.au/public_html/extensions/search_index/lib/class.search_index.php on line 663 and defined
For example, if the url params are like this:
?keywords=Narva+Auto+Fuses+-+Bulk&per-page=8&page=1§ions=products
it returns an error (note the hyphen between fuses and bulk)
But if the keywords param doesn't have the hyphen, like ?keywords=Narva+Auto+Fuses+Bulk&per-page=8&page=1§ions=products
then there is no error.
Has this been encountered before? Is there an easy solution or am I doing something stupid? If you need more info just let me know. You can go to clampline.com.au and search for narva globes and the first 2 should throw a hissy.
Nick, this might be a handy reference for this bug. Apparently these functions don't handle their option arguments correctly, so a little bit of a padding is needed.
(sidenote: What do you think of putting a similar String
class in the core that abstracts mb_
functions? I think I'd prefer just to require mb_string
tbh)