mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Avoid running validation again, when saveAll() is called with 'validate' => 'first'
This commit is contained in:
parent
d136fac219
commit
9556ff714d
1 changed files with 2 additions and 2 deletions
|
@ -2044,7 +2044,7 @@ class Model extends Object implements CakeEventListener {
|
||||||
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;
|
||||||
}
|
}
|
||||||
$options['validate'] = true;
|
$options['validate'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($options['atomic']) {
|
if ($options['atomic']) {
|
||||||
|
@ -2175,7 +2175,7 @@ class Model extends Object implements CakeEventListener {
|
||||||
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;
|
||||||
}
|
}
|
||||||
$options['validate'] = true;
|
$options['validate'] = false;
|
||||||
}
|
}
|
||||||
if ($options['atomic']) {
|
if ($options['atomic']) {
|
||||||
$db = $this->getDataSource();
|
$db = $this->getDataSource();
|
||||||
|
|
Loading…
Reference in a new issue