소스 검색

fixed small bug in sub-request profiling

Fabien Potencier 14 년 전
부모
커밋
e6ebf4da4c
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      src/Symfony/Bundle/FrameworkBundle/Profiler/ProfilerListener.php
  2. 1 1
      src/Symfony/Component/DependencyInjection/Container.php

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

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

+ 1 - 1
src/Symfony/Component/DependencyInjection/Container.php

@@ -314,7 +314,7 @@ class Container implements ContainerInterface
             return null;
         }
 
-        return $this->scopeStacks[$name]->current();
+        return $this->scopeStacks[$name]->top();
     }
 
     /**