mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Merge pull request #628 from tigrang/validation-translate
Ensure validation rule argument is a string before trying to translate.
This commit is contained in:
commit
9a693f9a13
1 changed files with 3 additions and 1 deletions
|
@ -3191,7 +3191,9 @@ class Model extends Object implements CakeEventListener {
|
|||
}
|
||||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue