Answer the question
In order to leave comments, you need to log in
Stripos in the MIGX extension filter - how to make it work correctly with Cyrillic?
Good day! I'm picking the MIGX extension - its filter. I need to display records where a keyword occurs - case insensitive. The code snippet in the extension is responsible for this:
case 'contains':
$output = strpos($subject, $operand) !== false ? $then : (isset($else) ? $else : '');
break;
case 'contains':
$subject = strtolower($subject);
$operand = strtolower($operand);
$output = stripos($subject, $operand) !== false ? $then : (isset($else) ? $else : '');
break;
Answer the question
In order to leave comments, you need to log in
Guys, it was all about php version. It was 5.3, changed to 5.6 and began to work. Or it was necessary to prescribe the data encoding.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question