Reset globals when a new global is added
authorJordi Boggiano <j.boggiano@seld.be>
Mon, 16 Jan 2012 14:22:29 +0000 (15:22 +0100)
committerJordi Boggiano <j.boggiano@seld.be>
Mon, 16 Jan 2012 14:22:29 +0000 (15:22 +0100)
lib/Twig/Environment.php

index f6eac6c..c026687 100644 (file)
@@ -935,6 +935,7 @@ class Twig_Environment
     public function addGlobal($name, $value)
     {
         $this->staging['globals'][$name] = $value;
+        $this->globals = null;
     }
 
     /**