*

T1ZE

  • **
  • 24 posts
Search error
« on: October 26, 2025, 03:16:50 PM »
Greetings to all! When searching, you get this error, along with the saved search.

Warning: preg_match(): Unknown modifier '1' in /home/t/domains/sel.yt/public_html/oc-includes/osclass/functions.php on line 827

Warning: preg_match(): Unknown modifier '1' in /home/t1/domains/sel.yt/public_html/oc-includes/osclass/functions.php on line 829

What kind of error is this and how can I fix it?
« Last Edit: October 27, 2025, 12:38:48 PM by T1ZE »

*

MB Themes

Re: Search error
« Reply #1 on: October 28, 2025, 11:11:08 AM »
In that file, search for this:
Code: [Select]
      if($word <> '') {
        if(preg_match("/{$word}/i", $search) && osc_latest_searches_restriction() == 1) {
          return '';
        } else if(preg_match("/{$word}/i", $search) && osc_latest_searches_restriction() == 2) {
          return $search;
        }
      }

and replace it with:
Code: [Select]
      if($word !== '') {
        $word = (string)$word;
        $search = (string)$search;
        $safeWord = preg_quote($word, '/');

        // Use UTF-8 safe case-insensitive match
        if(preg_match("/{$safeWord}/iu", $search)) {
          if(osc_latest_searches_restriction() == 1) {
            return '';
          } else if (osc_latest_searches_restriction() == 2) {
            return $search;
          }
        }
      }

Let me know if helped.
« Last Edit: October 28, 2025, 11:12:51 AM by MB Themes »
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

T1ZE

  • **
  • 24 posts
Re: Search error
« Reply #2 on: October 28, 2025, 04:15:50 PM »
That's the mistake now

*

MB Themes

Re: Search error
« Reply #3 on: October 29, 2025, 10:44:26 AM »
What are you trying to fitler? give url
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

MB Themes

Re: Search error
« Reply #4 on: October 29, 2025, 10:44:42 AM »
Also list of your blocked/banned words in language settings.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

T1ZE

  • **
  • 24 posts
Re: Search error
« Reply #5 on: October 29, 2025, 11:56:35 AM »
Of course, the forbidden words setting is used, but there is also an option to save recent search queries. And when I turn on this item and the last searches are searched and saved, an error is displayed where on line 827 829. And I can't figure out what kind of mistakes are these?