From 6c6a44fa84fe866e2e230da266a712d993226806 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 30 Sep 2011 22:49:47 +0200 Subject: [PATCH] fixed optimizer --- lib/Twig/NodeVisitor/Optimizer.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/Twig/NodeVisitor/Optimizer.php b/lib/Twig/NodeVisitor/Optimizer.php index 9bb3b8f..0d0ff84 100644 --- a/lib/Twig/NodeVisitor/Optimizer.php +++ b/lib/Twig/NodeVisitor/Optimizer.php @@ -94,7 +94,7 @@ class Twig_NodeVisitor_Optimizer implements Twig_NodeVisitorInterface if ( $node->getNode('expr') instanceof Twig_Node_Expression_BlockReference || $node->getNode('expr') instanceof Twig_Node_Expression_Parent || - ($node->getNode('expr') instanceof Twig_Node_Expression_Name && !$env->hasExtension('sandbox')) + ($node->getNode('expr') instanceof Twig_Node_Expression_Name && !$env->hasExtension('sandbox') && !$env->isStrictVariables()) ) { $node->getNode('expr')->setAttribute('output', true); -- 1.7.2.5