Permalink
Browse files

fixed optimizer

  • Loading branch information...
1 parent d340339 commit 6c6a44fa84fe866e2e230da266a712d993226806 @fabpot committed Sep 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Twig/NodeVisitor/Optimizer.php
@@ -94,7 +94,7 @@ protected function optimizePrintNode($node, $env)
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);

0 comments on commit 6c6a44f

Please sign in to comment.