Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #644 from nodesagency/hotfix/beforeValidate-copy-data

Hotfix/before validate copy data ( Another fix for Pull request 642 )
  • Loading branch information...
commit 0f54758e5a5e2ac369234e506827925bd781d9ea 2 parents b4a42e4 + e8fce37
José Lorenzo Rodríguez lorenzo authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  lib/Cake/Model/Model.php
2  lib/Cake/Model/Model.php
View
@@ -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;
@@ -2125,6 +2126,7 @@ public function validateMany($data, $options = array()) {
}
$return[$key] = $validates;
}
+ $this->data = $data;
$this->validationErrors = $validationErrors;
if (!$options['atomic']) {
return $return;
Please sign in to comment.
Something went wrong with that request. Please try again.