Another fix for Pull request 642

This commit is contained in:
Christian Winther 2012-05-09 23:34:37 +02:00 committed by Jose Lorenzo Rodriguez
parent 484c3ec688
commit fbd2132300

View file

@ -2044,6 +2044,7 @@ class Model extends Object implements CakeEventListener {
if ($options['validate'] === 'first') { if ($options['validate'] === 'first') {
$validates = $this->validateMany($data, $options); $validates = $this->validateMany($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;
} }