Skip to content
Permalink
Browse files

Add a check for row's key before assuming it's there

  • Loading branch information...
Patrick Conroy
Patrick Conroy committed Sep 25, 2015
1 parent 9c3f728 commit 0ab9fbb1ca22505a1e8ccf417046b27df87fa523
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/ORM/Association/SelectableAssociationTrait.php
@@ -285,7 +285,7 @@ protected function _resultInjector($fetchQuery, $resultMap, $options)
$sourceKey = $sourceKeys[0];
return function ($row) use ($resultMap, $sourceKey, $nestKey) {
if (isset($resultMap[$row[$sourceKey]])) {
if (isset($row[$sourceKey]) && isset($resultMap[$row[$sourceKey]])) {
$row[$nestKey] = $resultMap[$row[$sourceKey]];
}
return $row;

0 comments on commit 0ab9fbb

Please sign in to comment.
You can’t perform that action at this time.