Skip to content
Browse files

Copy changes made to $this->data in beforeValidate callbacks back to …

…saveAssociated data variable

This allow changes in beforeValidate to be saved
  • Loading branch information...
1 parent 597913a commit 45a86a8b20853801234f0ffb749259a24683a74c @jippi jippi committed
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 45a86a8

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