Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 70c634f

Browse filesBrowse files
bug #25119 [DI] Fix infinite loop when analyzing references (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [DI] Fix infinite loop when analyzing references | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #25101 | License | MIT | Doc PR | - Commits ------- f772d2f [DI] Fix infinite loop when analyzing references
2 parents 259ac66 + f772d2f commit 70c634f
Copy full SHA for 70c634f

File tree

1 file changed

+2
-3
lines changed
Filter options

1 file changed

+2
-3
lines changed

‎src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ private function analyzeCircularReferences(array $edges, &$checkedNodes, &$curre
356356
if (isset($checkedNodes[$id])) {
357357
continue;
358358
}
359+
$checkedNodes[$id] = true;
359360

360361
if ($node->getValue() && ($edge->isLazy() || $edge->isWeak())) {
361362
// no-op
@@ -367,10 +368,8 @@ private function analyzeCircularReferences(array $edges, &$checkedNodes, &$curre
367368
} else {
368369
$currentPath[$id] = $id;
369370
$this->analyzeCircularReferences($node->getOutEdges(), $checkedNodes, $currentPath);
371+
array_pop($currentPath);
370372
}
371-
372-
$checkedNodes[$id] = true;
373-
array_pop($currentPath);
374373
}
375374
}
376375

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.