diff --git a/src/Filter/Range.php b/src/Filter/Range.php index af23dd96953a2d5d99a22dbeb0d1d7a3f81ce9b3..e5702a7e9e58e6986d1bf815679ab47d0b5e4b5c 100644 --- a/src/Filter/Range.php +++ b/src/Filter/Range.php @@ -13,13 +13,14 @@ final class Range extends HttpFilter /** @throws FilterParameterValueIsNullException */ public function addToQuery(QueryBuilder $queryBuilder): QueryBuilder { - if (! isset($this->getHttpValue()['min']) && ! isset($this->getHttpValue()['max'])) { + if ((! isset($this->getHttpValue()['min']) && ! isset($this->getHttpValue()['max'])) + || (! is_numeric($this->getHttpValue()['min']) && ! is_numeric($this->getHttpValue()['max']))) { throw new FilterParameterValueIsNullException($this->field); } if (isset($this->getHttpValue()['min'])) { $queryBuilder->where( - $this->getColumn() . '>= ' . $this->getHttpValue()['min'] + $this->getColumn() . ' >= ' . $this->getHttpValue()['min'] ); }