We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27442
    • 103 Posts
    I seem to be getting lots of these in my error logs since enabling AjaxSearch (version 1.8.1 on Modx .9.6.2

    AjaxSearch seems to be functioning correctly, but what is this?

    [Sun Jun 07 09:29:12 2009] [error] [client XXX.XXX.XXX.XXX] PHP Warning: mb_substr_count() [<a href=’function.mb-substr-count’>function.mb-substr-count</a>]: Empty needle in /var/www/ah/assets/snippets/ajaxSearch/classes/search.class.inc.php on line 829, referer: http://www.advancedheaters.com/tubular.html
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If you are familiar with PHP, it uses a "needle" and "haystack" metaphore for whenever you are looking for an item (a "needle") in a group of items (a "haystack"). In case you are not familiar with English culture, the expression "looking for a needle in a haystack" is a common expression for looking for something that would be hard to find because it is so similar to everything else around it. Anyway, this error is indicating that the variable holding the item being looked for is empty, so something isn’t getting passed to the function properly.

      http://il2.php.net/mb_substr_count
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 5811
        • 1,717 Posts
        @sjh_vt

        Could you post your snippet calls here. May be you have a wrong call.
          • 27442
          • 103 Posts
          Whatever it was seems to have stopped. It was coming from 1 particular IP address. Perhaps I had something wrong with the call. I recently moved the site to a new server and there have been several changes I’ve made along the way. Thanks for replying.