Skip to content

Commit 6493dca

Browse files
committed
bug #993 Avoid iterating on null for DoctrineBundle 2.2 and lower (weaverryan)
This PR was merged into the 1.0-dev branch. Discussion ---------- Avoid iterating on null for DoctrineBundle 2.2 and lower Fixes #989 Commits ------- 53dec5c Avoid iterating on null for DoctrineBundle 2.2 and lower
2 parents e8fd1b5 + 53dec5c commit 6493dca

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)