Skip to content

Commit

Permalink
Out of range value in select box filter not throwing an exception now
Browse files Browse the repository at this point in the history
  • Loading branch information
o5 committed Nov 3, 2015
1 parent 87df599 commit 7e80eee
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,15 @@ public function __getConditions(array $filter)
{
$conditions = [];
if (!empty($filter)) {
$this['form']->setDefaults([Filter::ID => $filter]);
try {
$this['form']->setDefaults([Filter::ID => $filter]);
} catch (\Nette\InvalidArgumentException $e) {
$this->__triggerUserNotice($e->getMessage());
$filter = [];
if ($session = $this->getRememberSession()) {
$session->remove();
}
}

foreach ($filter as $column => $value) {
if ($component = $this->getFilter($column, FALSE)) {
Expand Down

0 comments on commit 7e80eee

Please sign in to comment.