From 717efd14fd991327263bf4752d9746b50a8bbcc2 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Tue, 8 Feb 2011 17:00:13 +0100 Subject: [PATCH] [Kernel] some tweaks --- src/Symfony/Component/HttpKernel/Kernel.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 86b7ebbe9d..6fa97f3696 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -164,8 +164,7 @@ abstract class Kernel implements KernelInterface public function isClassInActiveBundle($class) { foreach ($this->getBundles() as $bundle) { - $bundleClass = get_class($bundle); - if (0 === strpos($class, substr($bundleClass, 0, strrpos($bundleClass, '\\')))) { + if (0 === strpos($class, $bundle->getNamespace())) { return true; } } @@ -339,7 +338,7 @@ abstract class Kernel implements KernelInterface /** * Initialize the data structures related to the bundle management: - * - the bundle property maps a bundle name to the bundle instance, + * - the bundles property maps a bundle name to the bundle instance, * - the bundleMap property maps a bundle name to the bundle inheritance hierarchy (most derived bundle first). * * @throws \LogicException if two bundles share a common name