mirror of
https://github.com/processwire/processwire.git
synced 2025-08-12 17:54:44 +02:00
Fix behavior of PageFinder when selector has multiple fields before a != operator and no values after the operator, i.e. a|b|c!=
This commit is contained in:
@@ -2146,7 +2146,9 @@ class PageFinder extends Wire {
|
||||
|
||||
} else if($operator === '!=' || $operator === '<>') {
|
||||
// not equals
|
||||
$whereType = 'AND';
|
||||
$whereType = count($selector->fields()) > 1 && $ft->isEmptyValue($field, $value) ? 'OR' : 'AND';
|
||||
// alternate and technically more consistent behavior, but doesn't seem useful:
|
||||
// $whereType = count($selector->fields()) > 1 ? 'OR' : 'AND';
|
||||
$zeroIsEmpty = $ft->isEmptyValue($field, "0");
|
||||
$zeroIsNotEmpty = !$zeroIsEmpty;
|
||||
$value = (string) $value;
|
||||
|
Reference in New Issue
Block a user