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 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/Twig/Environment.php b/lib/Twig/Environment.php index f6eac6c..c026687 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; } /** -- 1.7.2.5