Fix notice when passing false.

This commit is contained in:
Mark Sch 2018-03-14 17:07:08 +01:00 committed by GitHub
parent 68de980972
commit b68f1cbb1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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])) {