From 49247695497d01c767178628bd5a5d64e29bdc0e Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Sun, 6 Aug 2017 13:45:24 +0200 Subject: [PATCH] [validation] Remove superfluous if-statement --- lib/validation.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/validation.php b/lib/validation.php index 69f91a0..e405b7c 100644 --- a/lib/validation.php +++ b/lib/validation.php @@ -28,12 +28,7 @@ function validateData(&$data, $parameters){ }; $validateCheckboxValue = function($value){ - $filteredValue = filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE); - - if(is_null($filteredValue)) - return null; - - return $filteredValue; + return filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE); }; $validateListValue = function($value, $expectedValues){