From c2da22a1c7024bbce3919783238a542440c44da7 Mon Sep 17 00:00:00 2001 From: "a.shamavov" Date: Tue, 4 Mar 2025 12:57:19 +0500 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=B0=D0=BD=20=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80=20Ran?= =?UTF-8?q?ge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Filter/Range.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Filter/Range.php b/src/Filter/Range.php index af23dd9..e5702a7 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'] ); } -- GitLab