Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › PHP Warning: strpos(): Empty needle
This topic contains 2 replies, has 2 voices, and was last updated by douglaskarr 7 years, 8 months ago.
- AuthorPosts
- January 25, 2016 at 4:31 am #7418
FTP Port 2222
I’m getting the following error in my logs:
[Sun Jan 24 09:20:19.783405 2016] [:error] [pid 29557] [client 43.255.190.30:51271] PHP Warning: strpos(): Empty needle in /nas/content/live/mtb/wp-content/plugins/ajax-search-pro/includes/suggest/titles_suggest.class.php on line 67, referer: https://www.marketingtechblog.com/viraltag-visual-social/ [Sun Jan 24 09:20:20.111713 2016] [:error] [pid 29557] [client 43.255.190.30:51271] PHP Warning: strpos(): Empty needle in /nas/content/live/mtb/wp-content/plugins/ajax-search-pro/includes/suggest/tags_suggest.class.php on line 31, referer: https://www.marketingtechblog.com/viraltag-visual-social/
January 25, 2016 at 8:47 am #7419Hi Douglas,
Thank you for the proper details, I have found the problem. In rare cases (like empty spaces, tabs) are passes to the suggestion algorithm, which was trimming these characters naturally, leaving an empty phrase, which caused this warning message.
I corrected by adding 1 extra line to check for empty string, the issue should be gone now. I’m also correcting this in the upcoming version, as this was an unknown bug yet.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 25, 2016 at 8:57 pm #7436Fantastic, thanks!
- AuthorPosts
You must be logged in to reply to this topic.