summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-07-16 10:46:46 +0000
committerDries Buytaert <dries@buytaert.net>2009-07-16 10:46:46 +0000
commit23e704747de91b86550c463964090aea223ce78c (patch)
tree87c54c8f5b0655df63628551bcc6c989f50dcc32
parent44740785fe811c86a64890e37faacf5cdf52e4ea (diff)
downloadbrdo-23e704747de91b86550c463964090aea223ce78c.tar.gz
brdo-23e704747de91b86550c463964090aea223ce78c.tar.bz2
- Patch #519612 by quicksketch: added drupal_function_exists() to file validators.
-rw-r--r--includes/file.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/file.inc b/includes/file.inc
index 08bbbfdd5..ead32264c 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -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.