updated bootstrap.php

This commit is contained in:
Fabien Potencier 2011-01-29 15:20:21 +01:00
parent 025e142dd4
commit dacb25f13a

View File

@ -705,11 +705,11 @@ abstract class Kernel implements KernelInterface
$this->bundleMap = array();
foreach ($this->registerBundles() as $bundle) {
$name = $bundle->getName();
$this->bundles[$name] = $bundle;
if (!isset($this->bundleMap[$name])) {
$this->bundleMap[$name] = array();
if (isset($this->bundles[$name])) {
throw new \LogicException(sprintf('Trying to register two bundles with the same name "%s"', $name));
}
$this->bundleMap[$name][] = $bundle;
$this->bundles[$name] = $bundle;
$this->bundleMap[$name] = array($bundle);
}
$extended = array();
foreach ($this->bundles as $name => $bundle) {