From 7a1275a1b1166a800dad177ebf2c37f4ce67b0b5 Mon Sep 17 00:00:00 2001 From: Christian Winther Date: Wed, 9 May 2012 22:57:21 +0200 Subject: [PATCH] Copy changes made to $this->data in beforeValidate callbacks back to saveAssociated data variable This allow changes in beforeValidate to be saved --- lib/Cake/Model/Model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Cake/Model/Model.php b/lib/Cake/Model/Model.php index 193f710de..b5a6ea7b8 100644 --- a/lib/Cake/Model/Model.php +++ b/lib/Cake/Model/Model.php @@ -2178,6 +2178,7 @@ class Model extends Object implements CakeEventListener { 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; }