mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Merge pull request #643 from nodesagency/hotfix/beforeValidate-copy-data
Hotfix/before validate copy data ( Another fix for Pull request 642 )
This commit is contained in:
commit
b4a42e4a03
1 changed files with 1 additions and 0 deletions
|
@ -2044,6 +2044,7 @@ class Model extends Object implements CakeEventListener {
|
|||
|
||||
if ($options['validate'] === 'first') {
|
||||
$validates = $this->validateMany($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