diff --git a/code/model/filters/MultiFieldPartialMatchFilter.php b/code/model/filters/MultiFieldPartialMatchFilter.php index a1f270773..db42b4c9d 100644 --- a/code/model/filters/MultiFieldPartialMatchFilter.php +++ b/code/model/filters/MultiFieldPartialMatchFilter.php @@ -54,7 +54,7 @@ function ($v) { } ); - if (count($this->subfilters) > 0) { + if (is_array($this->subfilters)) { foreach ($this->subfilters as $f) { $f->setModifiers($this->subfilterModifiers); } @@ -85,7 +85,7 @@ public function setValue($value) parent::setValue($value); - if (count($this->subfilters) > 0) { + if (is_array($this->subfilters)) { foreach ($this->subfilters as $f) { $f->setValue($value); } @@ -111,7 +111,7 @@ public function apply(DataQuery $query) $orGroup = $query->disjunctiveGroup(); $orGroup = parent::apply($orGroup); - if (count($this->subfilters) > 0) { + if (is_array($this->subfilters)) { foreach ($this->subfilters as $f) { $orGroup = $f->apply($orGroup); }