Skip to content

Commit 9ea6c23

Browse files
authored
Merge pull request #13 from jkwakman/jkwakman-anonymous-function-test-patch
Removed php @ warning suppression
2 parents 7a8f1d6 + 4dc68bb commit 9ea6c23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SimpleValidator/Validator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public static function validate($inputs, $rules, $naming = null) {
231231
/**
232232
* Handle anonymous functions
233233
*/
234-
if (@get_class($closure) == 'Closure') {
234+
if(is_object($closure) && get_class($closure) == 'Closure') {
235235
$refl_func = new \ReflectionFunction($closure);
236236
$validation = $refl_func->invokeArgs($params);
237237
}/**

0 commit comments

Comments
 (0)