diff options
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php | 4 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php index 5c2216cf..cd4d3490 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php | |||
@@ -38,6 +38,10 @@ class EntryFilterType extends AbstractType | |||
38 | 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { | 38 | 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { |
39 | $value = $values['value']; | 39 | $value = $values['value']; |
40 | 40 | ||
41 | if (null === $value['left_number'][0] || null === $value['right_number'][0]) { | ||
42 | return; | ||
43 | } | ||
44 | |||
41 | $min = (int) ($value['left_number'][0] * $this->user->getConfig()->getReadingSpeed()); | 45 | $min = (int) ($value['left_number'][0] * $this->user->getConfig()->getReadingSpeed()); |
42 | $max = (int) ($value['right_number'][0] * $this->user->getConfig()->getReadingSpeed()); | 46 | $max = (int) ($value['right_number'][0] * $this->user->getConfig()->getReadingSpeed()); |
43 | 47 | ||
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php index 64ebd631..df4c34cd 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php | |||
@@ -462,8 +462,8 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
462 | $form = $crawler->filter('button[id=submit-filter]')->form(); | 462 | $form = $crawler->filter('button[id=submit-filter]')->form(); |
463 | 463 | ||
464 | $data = [ | 464 | $data = [ |
465 | 'entry_filter[readingTime][right_number]' => 11, | 465 | 'entry_filter[readingTime][right_number]' => 22, |
466 | 'entry_filter[readingTime][left_number]' => 11, | 466 | 'entry_filter[readingTime][left_number]' => 22, |
467 | ]; | 467 | ]; |
468 | 468 | ||
469 | $crawler = $client->submit($form, $data); | 469 | $crawler = $client->submit($form, $data); |