Skip to content

Commit 61faae2

Browse files
rpg600dunglas
authored andcommitted
Fix "0" value in SearchFilter
Currently we are unable to filter by 0 (false) value, it has already been fixed in master https://github.com/dunglas/DunglasApiBundle/blob/master/Doctrine/Orm/Filter/SearchFilter.php#L102
1 parent 8a839e0 commit 61faae2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doctrine/Orm/Filter/SearchFilter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ public function apply(ResourceInterface $resource, QueryBuilder $queryBuilder, R
8989
{
9090
foreach ($this->extractProperties($request) as $property => $value) {
9191
if (
92-
empty($value) ||
9392
!$this->isPropertyEnabled($property) ||
94-
!$this->isPropertyMapped($property, $resource, true)
93+
!$this->isPropertyMapped($property, $resource, true) ||
94+
null === $value
9595
) {
9696
continue;
9797
}

0 commit comments

Comments
 (0)