From fb7585e7ee06c99e305f42d24402c3c8bd85d61a Mon Sep 17 00:00:00 2001 From: phpnut Date: Tue, 19 Sep 2006 02:08:54 +0000 Subject: [PATCH] Added fix for #1345 and #1417. This fixes Self Referencing Models losing data when recursive > 1 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3513 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/datasources/dbo_source.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index 2bb0d5c0d..c3ca9c4a3 100644 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -730,7 +730,9 @@ class DboSource extends DataSource { } } else { if ($merge[0][$association] === false) { - $data[$association] = array(); + if(!isset($data[$association])){ + $data[$association] = array(); + } } else { foreach($merge as $i => $row) { if (count($row) == 1) {