From f139b0312f5d4a65bc75b73c804b9e7e7fb8f4ce Mon Sep 17 00:00:00 2001 From: phpnut Date: Sun, 12 Oct 2008 22:21:55 +0000 Subject: [PATCH] Fixes #5591 Dynamic With Models broken after changeset [7732] git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7739 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index 0e63c1c25..e6cf47a7d 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -620,9 +620,10 @@ class Model extends Overloadable { $class = $assocKey; foreach ($this->__associationKeys[$type] as $key) { + $dynamicWith = false; + if (!isset($this->{$type}[$assocKey][$key]) || $this->{$type}[$assocKey][$key] === null) { $data = ''; - $dynamicWith = false; switch($key) { case 'fields':