Skip to content

Commit 53dec5c

Browse files
committed
Avoid iterating on null for DoctrineBundle 2.2 and lower
1 parent f76abb1 commit 53dec5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Doctrine/DoctrineHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ private function getMappingDriverForNamespace(string $namespace): ?MappingDriver
311311
$lowestCharacterDiff = null;
312312
$foundDriver = null;
313313

314-
foreach ($this->mappingDriversByPrefix as $key => $mappings) {
314+
foreach ($this->mappingDriversByPrefix ?? [] as $mappings) {
315315
foreach ($mappings as [$prefix, $driver]) {
316316
$diff = substr_compare($namespace, $prefix, 0);
317317

0 commit comments

Comments
 (0)