Browse Source

[FrameworkBundle] fixed profiler on requests for which no route matches

Fabien Potencier 14 years ago
parent
commit
bb206a7b7b

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/Profiler/ProfilerListener.php

@@ -91,7 +91,7 @@ class ProfilerListener
 
 
         $profiler = $this->container->get('profiler');
         $profiler = $this->container->get('profiler');
 
 
-        if ($parent = $this->container->getCurrentScopedStack('request')) {
+        if ($parent = $this->container->getCurrentScopedStack('request') && isset($parent['request']['profiler'])) {
             $profiler->setParent($parent['request']['profiler']->getToken());
             $profiler->setParent($parent['request']['profiler']->getToken());
         }
         }