Permalink
Browse files

Merge pull request #628 from tigrang/validation-translate

Ensure validation rule argument is a string before trying to translate.
  • Loading branch information...
2 parents 46bce1a + 77f6d88 commit 9a693f9a13049822286824887044b320734098aa @ADmad ADmad committed Apr 27, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/Cake/Model/Model.php
View
@@ -3191,7 +3191,9 @@ public function invalidFields($options = array()) {
}
if (!empty($args)) {
foreach ($args as $k => $arg) {
- $args[$k] = __d($validationDomain, $arg);
+ if (is_string($arg)) {
+ $args[$k] = __d($validationDomain, $arg);
+ }
}
}
$message = __d($validationDomain, $message, $args);

0 comments on commit 9a693f9

Please sign in to comment.