summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Grossenbacher2011-04-01 19:33:18 (GMT)
committer Sascha Grossenbacher2011-04-01 19:33:18 (GMT)
commitca62452baa936996c83aa743f86f651c001064cd (patch)
tree39db1b07cfb88271baa7f45e642fdc10070feb78
parent9201459ffd74a1451e6c992cd1cb8456b8e62451 (diff)
#1105520 by franz: Fixed validation errors returned by the validate hook are incorrectly merged.
-rw-r--r--privatemsg.module3
1 files changed, 2 insertions, 1 deletions
diff --git a/privatemsg.module b/privatemsg.module
index 71a5dce..1b33419 100644
--- a/privatemsg.module
+++ b/privatemsg.module
@@ -1725,7 +1725,8 @@ function _privatemsg_validate_message(&$message, $form = FALSE) {
}
}
- $messages += module_invoke_all('privatemsg_message_validate', $message, $form);
+ $messages = array_merge_recursive(module_invoke_all('privatemsg_message_validate', $message, $form), $messages);
+
// Check if there are errors in $messages or if $form is TRUE, there are form errors.
$success = empty($messages['error']) || ($form && count((array)form_get_errors()) > 0);
return array(