From 2c00dddf01e4c94e856d7c9e9e2e85b2de8dceec Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 18 Jun 2016 00:22:04 +0200 Subject: [PATCH] fixup! Handle only upper or only lower reading filter --- src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php index 9d63a8a92..3c597b5db 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php @@ -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 {