Skip to content
Snippets Groups Projects

check that $function is callable

1 file
+ 3
1
Compare changes
  • Side-by-side
  • Inline
+ 3
1
@@ -643,7 +643,9 @@ function filefield_sources_element_validate($element, $file, FormStateInterface
// reference (required for PHP 5.3 and higher).
array_unshift($args, NULL);
$args[0] = &$file;
$errors = array_merge($errors, call_user_func_array($function, $args));
if (is_callable($function)) {
$errors = array_merge($errors, call_user_func_array($function, $args));
}
}
}
Loading