mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-06 11:32:40 +00:00
fixes #4861, find all recursive 2 with habtm
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7238 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
8b9aa057dd
commit
1ff02bde7a
1 changed files with 3 additions and 1 deletions
|
@ -962,7 +962,9 @@ class DboSource extends DataSource {
|
|||
} else {
|
||||
foreach ($merge as $i => $row) {
|
||||
if (count($row) == 1) {
|
||||
$data[$association][] = $row[$association];
|
||||
if (empty($data[$association]) || (isset($data[$association]) && !in_array($row[$association], $data[$association]))) {
|
||||
$data[$association][] = $row[$association];
|
||||
}
|
||||
} else {
|
||||
$tmp = array_merge($row[$association], $row);
|
||||
unset($tmp[$association]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue