From 3db62dae4bd35909275acf2d5f97d2fb8a595aab Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 16 Jan 2012 15:22:29 +0100 Subject: [PATCH] Reset globals when a new global is added --- lib/Twig/Environment.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Twig/Environment.php b/lib/Twig/Environment.php index f6eac6c85..c02668722 100644 --- a/lib/Twig/Environment.php +++ b/lib/Twig/Environment.php @@ -935,6 +935,7 @@ class Twig_Environment public function addGlobal($name, $value) { $this->staging['globals'][$name] = $value; + $this->globals = null; } /**