Commit 23e70474 authored by Dries's avatar Dries
Browse files

- Patch #519612 by quicksketch: added drupal_function_exists() to file validators.

parent 44740785
......@@ -1041,8 +1041,10 @@ function file_validate(&$file, $validators = array()) {
// Call the validation functions specified by this function's caller.
$errors = array();
foreach ($validators as $function => $args) {
array_unshift($args, $file);
$errors = array_merge($errors, call_user_func_array($function, $args));
if (drupal_function_exists($function)) {
array_unshift($args, $file);
$errors = array_merge($errors, call_user_func_array($function, $args));
}
}
// Let other modules perform validation on the new file.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment