mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 19:36:43 +00:00
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:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user