瀏覽代碼

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

Fabien Potencier 14 年之前
父節點
當前提交
bb206a7b7b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Bundle/FrameworkBundle/Profiler/ProfilerListener.php

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

@@ -91,7 +91,7 @@ class ProfilerListener
 
         $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());
         }