mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Copy changes made to $this->data in beforeValidate callbacks back to saveAssociated data variable
This allow changes in beforeValidate to be saved
This commit is contained in:
parent
7592eb94ac
commit
7a1275a1b1
1 changed files with 1 additions and 0 deletions
|
@ -2178,6 +2178,7 @@ class Model extends Object implements CakeEventListener {
|
|||
|
||||
if ($options['validate'] === 'first') {
|
||||
$validates = $this->validateAssociated($data, $options);
|
||||
$data = $this->data;
|
||||
if ((!$validates && $options['atomic']) || (!$options['atomic'] && in_array(false, $validates, true))) {
|
||||
return $validates;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue