fixup! Handle only upper or only lower reading filter

This commit is contained in:
Jeremy Benoist 2016-06-18 00:22:04 +02:00
parent 1bdbc39f02
commit 2c00dddf01

View file

@ -45,10 +45,10 @@ class EntryFilterType extends AbstractType
if (null === $lower && null === $upper) {
// no value? no filter
return;
} else if (null === $lower && null !== $upper) {
} elseif (null === $lower && null !== $upper) {
// only lower value is defined: query all entries with reading LOWER THAN this value
$expression = $filterQuery->getExpr()->lte($field, $max);
} else if (null !== $lower && null === $upper) {
} elseif (null !== $lower && null === $upper) {
// only upper value is defined: query all entries with reading GREATER THAN this value
$expression = $filterQuery->getExpr()->gte($field, $min);
} else {