Skip to content

Commit

Permalink
Merged #701
Browse files Browse the repository at this point in the history
Check for array, rather than assuming an array
  • Loading branch information
bummzack authored Dec 6, 2018
2 parents 1bc44e9 + 1c99335 commit d866706
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/model/filters/MultiFieldPartialMatchFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down

0 comments on commit d866706

Please sign in to comment.