Skip to content

Commit c5315f8

Browse files
authored
Merge pull request #11368 from greg0ire/address-deprecation
Avoid array access
2 parents b0d07ff + 5820bb8 commit c5315f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/UnitOfWork.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2662,13 +2662,13 @@ private function eagerLoadCollections(array $collections, ToManyInverseSideMappi
26622662
foreach ($found as $targetValue) {
26632663
$sourceEntity = $targetProperty->getValue($targetValue);
26642664

2665-
if ($sourceEntity === null && isset($targetClass->associationMappings[$mappedBy]['joinColumns'])) {
2665+
if ($sourceEntity === null && isset($targetClass->associationMappings[$mappedBy]->joinColumns)) {
26662666
// case where the hydration $targetValue itself has not yet fully completed, for example
26672667
// in case a bi-directional association is being hydrated and deferring eager loading is
26682668
// not possible due to subclassing.
26692669
$data = $this->getOriginalEntityData($targetValue);
26702670
$id = [];
2671-
foreach ($targetClass->associationMappings[$mappedBy]['joinColumns'] as $joinColumn) {
2671+
foreach ($targetClass->associationMappings[$mappedBy]->joinColumns as $joinColumn) {
26722672
$id[] = $data[$joinColumn['name']];
26732673
}
26742674
} else {

0 commit comments

Comments
 (0)