mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing missing array cast that could result in warnings from array_merge
if a model or behavior returned false from a beforeValidate callback. Fixes #1629
This commit is contained in:
parent
a0321a723b
commit
27952ebc9a
1 changed files with 1 additions and 1 deletions
|
@ -843,7 +843,7 @@ class Controller extends Object {
|
|||
$object =& $this->{$object->alias};
|
||||
}
|
||||
$object->set($object->data);
|
||||
$errors = array_merge($errors, $object->invalidFields());
|
||||
$errors = array_merge($errors, (array)$object->invalidFields());
|
||||
}
|
||||
|
||||
return $this->validationErrors = (!empty($errors) ? $errors : false);
|
||||
|
|
Loading…
Reference in a new issue