1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-10 16:54:44 +02:00
This commit is contained in:
Ryan Cramer
2021-10-04 10:56:12 -04:00
parent 68bd38d1c9
commit f61feb56fd

View File

@@ -337,12 +337,13 @@ class ProcessPageSearch extends Process implements ConfigurableModule {
} else { } else {
$operator = substr($name, -1) . '='; $operator = '=';
$operatorChars = preg_quote(implode('', Selectors::getOperatorChars()));
if(isset($this->operators[$operator])) { if(preg_match('/^(.+?)([' . $operatorChars . ']+)$/', $name, $matches)) {
$name = substr($name, 0, -1); $name = $matches[1];
} else { $operator = $matches[2] . '=';
$operator = '='; // if unsupported operator requested, substitute '='
if(!isset($this->operators[$operator])) $operator = '=';
} }
} }