Skip to content

Commit

Permalink
Fixing saveMany
Browse files Browse the repository at this point in the history
  • Loading branch information
jippi authored and lorenzo committed May 11, 2012
1 parent fbd2132 commit ad4e461
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Cake/Model/Model.php
Expand Up @@ -2117,6 +2117,7 @@ public function validateMany($data, $options = array()) {
} else {
$validates = $this->create($record) && $this->validates($options);
}
$data[$key] = $this->data;
if ($validates === false || (is_array($validates) && in_array(false, $validates, true))) {
$validationErrors[$key] = $this->validationErrors;
$validates = false;
Expand All @@ -2125,6 +2126,7 @@ public function validateMany($data, $options = array()) {
}
$return[$key] = $validates;
}
$this->data = $data;
$this->validationErrors = $validationErrors;
if (!$options['atomic']) {
return $return;
Expand Down

0 comments on commit ad4e461

Please sign in to comment.