Merge pull request #628 from tigrang/validation-translate

Ensure validation rule argument is a string before trying to translate.
This commit is contained in:
ADmad 2012-04-27 06:47:09 -07:00
commit 9a693f9a13

View file

@ -3191,7 +3191,9 @@ class Model extends Object implements CakeEventListener {
} }
if (!empty($args)) { if (!empty($args)) {
foreach ($args as $k => $arg) { foreach ($args as $k => $arg) {
$args[$k] = __d($validationDomain, $arg); if (is_string($arg)) {
$args[$k] = __d($validationDomain, $arg);
}
} }
} }
$message = __d($validationDomain, $message, $args); $message = __d($validationDomain, $message, $args);