We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39258
    • 3 Posts
    When I search for certain words, I get two errors:

    Warning: strpos() [function.strpos]: Offset not contained in string in /core/components/simplesearch/model/simplesearch/simplesearch.class.php on line 387

    Warning: strpos() [function.strpos]: Offset not contained in string in /core/components/simplesearch/model/simplesearch/simplesearch.class.php on line 387

    -------------------

    After the errors, the search results appear. Can someone help eliminate these error messages?
      • 39258
      • 3 Posts
      Here is a screenshot of the site with said errors. [ed. note: roadog last edited this post 14 years, 2 months ago.]
        • 39258
        • 3 Posts
        RESOLVED

        I edited the line number 387 in simplesearch.class.php to:

        $pos_end = min(strpos($text, ' ', 20), strpos($text, '.', 20));

        Seems to be working without errors now.
          • 42497
          • 5 Posts
          I'm having a similar problem since upgrading to revo 2.2.6:

          Offset not contained in string in ..... simplesearch/model/simplesearch/simplesearch.class.php on line 263

          I've upgraded the Simplesearch package to 1.6.1, but this see presents the same problem.

          Line 263:
          $pos = min(mb_strpos($text, ' ', $length - 1, $encoding), mb_strpos($text, '.', $length - 1, $encoding));


          Does anyone know how to fix this issue?

          Thanks