Skip to content

Commit

Permalink
CI didn't like inline ??= in older PHP versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mcurland committed Dec 10, 2023
1 parent 9f3fa0e commit cb7ddaf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,11 @@ public function loadOneToOneEntity(array $assoc, $sourceEntity, array $identifie
// this case we directly reference the column-keyed data used
// to initialize the source entity before throwing an exception.
$resolvedSourceData = false;
if (isset(($sourceEntityData ??= $this->em->getUnitOfWork()->getOriginalEntityData($sourceEntity))[$sourceKeyColumn])) {
if (! isset($sourceEntityData)) {
$sourceEntityData = $this->em->getUnitOfWork()->getOriginalEntityData($sourceEntity);
}

if (isset($sourceEntityData[$sourceKeyColumn])) {
$dataValue = $sourceEntityData[$sourceKeyColumn];
if ($dataValue !== null) {
$resolvedSourceData = true;
Expand Down

0 comments on commit cb7ddaf

Please sign in to comment.