Permalink
Browse files

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

Copy changes made to $this->data in beforeValidate callbacks
  • Loading branch information...
2 parents 597913a + 45a86a8 commit 6bd7da36e7e74fb0f83f619a552a852b8abe63a8 @lorenzo lorenzo committed May 9, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/Cake/Model/Model.php
View
1 lib/Cake/Model/Model.php
@@ -2178,6 +2178,7 @@ public function saveAssociated($data = null, $options = array()) {
if ($options['validate'] === 'first') {
$validates = $this->validateAssociated($data, $options);
+ $data = $this->data;
if ((!$validates && $options['atomic']) || (!$options['atomic'] && in_array(false, $validates, true))) {
return $validates;
}

0 comments on commit 6bd7da3

Please sign in to comment.