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
This commit is contained in:
phpnut 2006-09-19 02:08:54 +00:00
parent 8760dce3ef
commit fb7585e7ee

View file

@ -730,7 +730,9 @@ class DboSource extends DataSource {
} }
} else { } else {
if ($merge[0][$association] === false) { if ($merge[0][$association] === false) {
$data[$association] = array(); if(!isset($data[$association])){
$data[$association] = array();
}
} else { } else {
foreach($merge as $i => $row) { foreach($merge as $i => $row) {
if (count($row) == 1) { if (count($row) == 1) {