mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +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
597913aa5b
commit
45a86a8b20
1 changed files with 1 additions and 0 deletions
|
@ -2178,6 +2178,7 @@ class Model extends Object implements CakeEventListener {
|
||||||
|
|
||||||
if ($options['validate'] === 'first') {
|
if ($options['validate'] === 'first') {
|
||||||
$validates = $this->validateAssociated($data, $options);
|
$validates = $this->validateAssociated($data, $options);
|
||||||
|
$data = $this->data;
|
||||||
if ((!$validates && $options['atomic']) || (!$options['atomic'] && in_array(false, $validates, true))) {
|
if ((!$validates && $options['atomic']) || (!$options['atomic'] && in_array(false, $validates, true))) {
|
||||||
return $validates;
|
return $validates;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue