Skip to content
This repository
Browse code

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 authored May 09, 2012

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. 2  lib/Cake/Model/Model.php
2  lib/Cake/Model/Model.php
@@ -2117,6 +2117,7 @@ public function validateMany($data, $options = array()) {
2117 2117
 			} else {
2118 2118
 				$validates = $this->create($record) && $this->validates($options);
2119 2119
 			}
  2120
+			$data[$key] = $this->data;
2120 2121
 			if ($validates === false || (is_array($validates) && in_array(false, $validates, true))) {
2121 2122
 				$validationErrors[$key] = $this->validationErrors;
2122 2123
 				$validates = false;
@@ -2125,6 +2126,7 @@ public function validateMany($data, $options = array()) {
2125 2126
 			}
2126 2127
 			$return[$key] = $validates;
2127 2128
 		}
  2129
+		$this->data = $data;
2128 2130
 		$this->validationErrors = $validationErrors;
2129 2131
 		if (!$options['atomic']) {
2130 2132
 			return $return;

0 notes on commit 0f54758

Please sign in to comment.
Something went wrong with that request. Please try again.