Optimize the retrieval of reserved macro names

The list of reserved names does not need to be reset for each template
compilation.
This commit is contained in:
Christophe Coevoet
2015-08-17 11:47:30 +02:00
parent c27b04c9d6
commit c267257ccf
+1 -1
View File
@@ -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