Просмотр исходного кода

fixed small bug in sub-request profiling

Fabien Potencier 14 лет назад
Родитель
Сommit
e6ebf4da4c

+ 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();
     }
 
     /**