From c267257ccf45d0ed0d08ec9febc4c55ae7f19188 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Mon, 17 Aug 2015 11:47:30 +0200 Subject: [PATCH] Optimize the retrieval of reserved macro names The list of reserved names does not need to be reset for each template compilation. --- lib/Twig/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Twig/Parser.php b/lib/Twig/Parser.php index dd9c1fc33..6f24ee659 100644 --- a/lib/Twig/Parser.php +++ b/lib/Twig/Parser.php @@ -64,7 +64,7 @@ class Twig_Parser implements Twig_ParserInterface { // push all variables into the stack to keep the current state of the parser $vars = get_object_vars($this); - unset($vars['stack'], $vars['env'], $vars['handlers'], $vars['visitors'], $vars['expressionParser']); + unset($vars['stack'], $vars['env'], $vars['handlers'], $vars['visitors'], $vars['expressionParser'], $vars['reservedMacroNames']); $this->stack[] = $vars; // tag handlers