Przeglądaj źródła

[TwigBundle] removed the cache for globals (does not work when working in functional tests)

Fabien Potencier 14 lat temu
rodzic
commit
46f3da50d8

+ 2 - 2
src/Symfony/Bundle/TwigBundle/GlobalVariables.php

@@ -30,7 +30,7 @@ class GlobalVariables
     public function getSecurity()
     {
         if ($this->container->has('security.context')) {
-            return $this->security = $this->container->get('security.context');
+            return $this->container->get('security.context');
         }
     }
 
@@ -38,7 +38,7 @@ class GlobalVariables
     {
         $security = $this->getSecurity();
         if ($security && $user = $security->getUser()) {
-            return $this->user = $user;
+            return $user;
         }
     }