From 727e1683128fd5be46e8ea053a1b4f1135793cd5 Mon Sep 17 00:00:00 2001 From: Maxime Renou Date: Tue, 30 Apr 2019 12:19:45 +0200 Subject: [PATCH] Fiiiiiiix --- ValidatorBundle/Validator.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ValidatorBundle/Validator.php b/ValidatorBundle/Validator.php index 4eea215..d2a4927 100644 --- a/ValidatorBundle/Validator.php +++ b/ValidatorBundle/Validator.php @@ -300,16 +300,16 @@ class Validator $success = !(is_null($value)); break; case 'integer': - $success = (filter_var($value, FILTER_VALIDATE_INT) ? true : false); + $success = (filter_var($value, FILTER_VALIDATE_INT) !== false); break; case 'float': - $success = (filter_var($value, FILTER_VALIDATE_FLOAT) ? true : false); + $success = (filter_var($value, FILTER_VALIDATE_FLOAT) !== false); break; case 'boolean': - $success = (filter_var($value, FILTER_VALIDATE_BOOLEAN) ? true : false); + $success = (filter_var($value, FILTER_VALIDATE_BOOLEAN) !== false); break; case 'email': - $success = (filter_var($value, FILTER_VALIDATE_EMAIL) ? true : false); + $success = (filter_var($value, FILTER_VALIDATE_EMAIL) !== false); break; case 'phone': $_pattern = "/^\+?\d{7,15}$/";