In that file, search for this:
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:
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.