1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 18:24:57 +02:00
This commit is contained in:
Ryan Cramer
2019-03-26 12:21:18 -04:00
parent e0a96d40a2
commit f7b99d7676

View File

@@ -352,9 +352,11 @@ abstract class Selector extends WireData {
// $values1 is the value stored by the selector
// $values2 is the value passed into the matches() function
$numMatches = 0;
if($operator == '!=') $numMatchesRequired = (count($values1) + count($values2)) - 1;
else $numMatchesRequired = 1;
$numMatches = 0;
$numMatchesRequired = 1;
if(($operator === '!=' && !$this->not) || ($this->not && $operator !== '!=')) {
$numMatchesRequired = count($values1) * count($values2);
}
$fields = is_array($field) ? $field : array($field);