PHP Warning: strpos(): Empty needle

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 douglaskarr 6 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #7418
    douglaskarr
    douglaskarr
    Participant

    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/
    #7419
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi 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 :)


    #7436
    douglaskarr
    douglaskarr
    Participant

    Fantastic, thanks!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.