diff --git a/src/SimpleValidator/Validator.php b/src/SimpleValidator/Validator.php index 2d32226..f59ae56 100644 --- a/src/SimpleValidator/Validator.php +++ b/src/SimpleValidator/Validator.php @@ -231,7 +231,7 @@ public static function validate($inputs, $rules, $naming = null) { /** * Handle anonymous functions */ - if (@get_class($closure) == 'Closure') { + if(is_object($closure) && get_class($closure) == 'Closure') { $refl_func = new \ReflectionFunction($closure); $validation = $refl_func->invokeArgs($params); }/**