Permalink
Browse files

[DependencyInjection] fixed PHP notice when the scope is not defined

  • Loading branch information...
1 parent 550df5a commit cec98c1d7a07da9d7d72e4984f5ae584db4aed0e @fabpot fabpot committed Mar 23, 2013
View
4 src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php
@@ -72,8 +72,8 @@ public function process(ContainerBuilder $container)
$this->currentScopeChildren = array_keys($scopes);
$this->currentScopeAncestors = array();
} elseif (ContainerInterface::SCOPE_PROTOTYPE !== $scope) {
- $this->currentScopeChildren = $children[$scope];
- $this->currentScopeAncestors = $ancestors[$scope];
+ $this->currentScopeChildren = isset($children[$scope]) ? $children[$scope] : array();
+ $this->currentScopeAncestors = isset($ancestors[$scope]) ? $ancestors[$scope] : array();
}
$this->validateReferences($definition->getArguments());

0 comments on commit cec98c1

Please sign in to comment.