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

View File

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