minor #20741 [DependencyInjection] fix a test checking for a value (xabbuh)

This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] fix a test checking for a value

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | 5f62f01943
| License       | MIT
| Doc PR        |

Commits
-------

aea0478 fix a test checking for a value
This commit is contained in:
Nicolas Grekas 2016-12-03 15:32:00 +01:00
commit e0bd2a2b08
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ class CheckCircularReferencesPass implements CompilerPassInterface
if (empty($this->checkedNodes[$id])) {
// don't check circular dependencies for lazy services
if (!$node->getValue() && $node->getValue()->isLazy()) {
if (!$node->getValue() || !$node->getValue()->isLazy()) {
$searchKey = array_search($id, $this->currentPath);
$this->currentPath[] = $id;