mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix notice when passing false.
This commit is contained in:
parent
68de980972
commit
b68f1cbb1f
1 changed files with 18 additions and 16 deletions
|
@ -1566,6 +1566,7 @@ class DboSource extends DataSource {
|
|||
// Make one pass through children and collect by parent key
|
||||
// Make second pass through parents and associate children
|
||||
$mergedByFK = array();
|
||||
if (is_array($assocResultSet)) {
|
||||
foreach ($assocResultSet as $data) {
|
||||
$fk = $data[$association][$foreignKey];
|
||||
if (! array_key_exists($fk, $mergedByFK)) {
|
||||
|
@ -1585,6 +1586,7 @@ class DboSource extends DataSource {
|
|||
$mergedByFK[$fk][] = $data[$association];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($resultSet as &$result) {
|
||||
if (!isset($result[$modelAlias])) {
|
||||
|
|
Loading…
Reference in a new issue