From 40c261b7f0d837e6aea3ec512ca5b0819d6008c3 Mon Sep 17 00:00:00 2001 From: Valentinas Kasteckis Date: Mon, 7 Nov 2022 10:16:16 +0200 Subject: [PATCH] Check if value is numeric before abs() --- Grid/Source/Source.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Grid/Source/Source.php b/Grid/Source/Source.php index f2605216..6b9511cd 100644 --- a/Grid/Source/Source.php +++ b/Grid/Source/Source.php @@ -315,12 +315,12 @@ public function executeFromData($columns, $page = 0, $limit = 0, $maxResults = n // Test switch ($operator) { case Column::OPERATOR_EQ: - if ($dataIsNumeric) { + if ($dataIsNumeric && is_numeric($value)) { $found = abs($fieldValue - $value) < 0.00001; break; } case Column::OPERATOR_NEQ: - if ($dataIsNumeric) { + if ($dataIsNumeric && is_numeric($value)) { $found = abs($fieldValue - $value) > 0.00001; break; }