From 2312eabc34d694f4efb3aad18ab624eb2be77db6 Mon Sep 17 00:00:00 2001 From: runz0rd Date: Mon, 24 Oct 2016 23:21:08 +0200 Subject: [PATCH] Small change to filter logic --- src/Common/Util/Validation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/Util/Validation.php b/src/Common/Util/Validation.php index d7552ec..da6ea58 100644 --- a/src/Common/Util/Validation.php +++ b/src/Common/Util/Validation.php @@ -75,7 +75,7 @@ public static function hasProperty($source, string $propertyName) { */ public static function filterInteger($value) { $intValue = filter_var($value, FILTER_VALIDATE_INT); - if($intValue !== false && !is_bool($value)) { + if($intValue !== false && is_string($value)) { $value = $intValue; } @@ -103,7 +103,7 @@ public static function filterBoolean($value) { */ public static function filterFloat($value) { $floatValue = filter_var($value, FILTER_VALIDATE_FLOAT); - if($floatValue !== false) { + if($floatValue !== false && is_string($value)) { $value = $floatValue; }