Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d1a3115

Browse files
committed
[DependencyInjection] fixed PHP notice when the scope is not defined
1 parent bb10145 commit d1a3115

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Compiler/CheckReferenceValidityPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ public function process(ContainerBuilder $container)
7272
$this->currentScopeChildren = array_keys($scopes);
7373
$this->currentScopeAncestors = array();
7474
} elseif (ContainerInterface::SCOPE_PROTOTYPE !== $scope) {
75-
$this->currentScopeChildren = $children[$scope];
76-
$this->currentScopeAncestors = $ancestors[$scope];
75+
$this->currentScopeChildren = isset($children[$scope]) ? $children[$scope] : array();
76+
$this->currentScopeAncestors = isset($ancestors[$scope]) ? $ancestors[$scope] : array();
7777
}
7878

7979
$this->validateReferences($definition->getArguments());

0 commit comments

Comments
 (0)