Skip to content

Commit

Permalink
[REF] better value checks
Browse files Browse the repository at this point in the history
  • Loading branch information
n3o77 committed Jul 31, 2024
1 parent 062f05c commit 1fe6630
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/FilterType/AbstractFilterType.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function handleFilter(QueryBuilder $qb, FilterRow $filterRow, array $opti
$value = $this->getExpressionValue($filterRow);

$multiple = ($options['multiple'] ?? false) === true;
if (!($multiple && \is_array($value) && [] !== $value) && null === $value && $this->hasExpressionValue($filterRow)) {
if (!($multiple && \is_array($value) && [] !== $value) && !(null !== $value && !\is_array($value)) && $this->hasExpressionValue($filterRow)) {
return;
}

Expand Down Expand Up @@ -195,7 +195,7 @@ public function handleFilter(QueryBuilder $qb, FilterRow $filterRow, array $opti
$qb->having('COUNT(DISTINCT '.$alias.') = :cnt_'.$suffix);
$qb->setParameter('cnt_'.$suffix, \count($value));
}
} elseif (null !== $value) {
} elseif (null !== $value && !\is_array($value)) {
$suffix = uniqid('', false);

if ($fieldInfo->fieldData && ClassMetadata::INHERITANCE_TYPE_TABLE_PER_CLASS === $fieldInfo->fieldData['type']) {
Expand Down

0 comments on commit 1fe6630

Please sign in to comment.