mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 08:17:12 +02:00
Fix issue processwire/processwire-issues#1439
This commit is contained in:
@@ -337,12 +337,13 @@ class ProcessPageSearch extends Process implements ConfigurableModule {
|
||||
|
||||
} else {
|
||||
|
||||
$operator = substr($name, -1) . '=';
|
||||
|
||||
if(isset($this->operators[$operator])) {
|
||||
$name = substr($name, 0, -1);
|
||||
} else {
|
||||
$operator = '=';
|
||||
$operator = '=';
|
||||
$operatorChars = preg_quote(implode('', Selectors::getOperatorChars()));
|
||||
if(preg_match('/^(.+?)([' . $operatorChars . ']+)$/', $name, $matches)) {
|
||||
$name = $matches[1];
|
||||
$operator = $matches[2] . '=';
|
||||
// if unsupported operator requested, substitute '='
|
||||
if(!isset($this->operators[$operator])) $operator = '=';
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user