From: Fabien Potencier Date: Fri, 30 Sep 2011 20:49:47 +0000 (+0200) Subject: fixed optimizer X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=6c6a44fa84fe866e2e230da266a712d993226806;p=web%2Fkonrad%2Ftwig.git fixed optimizer --- 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);