Moved default filter fix to its proper place
authorTobias Naumann <tna@netz3.ch>
Thu, 26 May 2011 15:00:59 +0000 (17:00 +0200)
committerTobias Naumann <tna@netz3.ch>
Thu, 26 May 2011 15:03:41 +0000 (17:03 +0200)
lib/Twig/Node/Expression/Filter.php

index a1a97d1..1632778 100644 (file)
@@ -38,9 +38,9 @@ class Twig_Node_Expression_Filter extends Twig_Node_Expression
             } elseif ($this->getNode('node') instanceof Twig_Node_Expression_GetAttr) {
                 $this->getNode('node')->setAttribute('is_defined_test', true);
                 $compiler->subcompile($this->getNode('node'));
+                $this->getNode('node')->removeAttribute('is_defined_test');
             }
 
-            $this->getNode('node')->removeAttribute('is_defined_test');
             $compiler->raw(') ? (');
             $this->compileFilter($compiler, $filter);
             $compiler->raw(') : (');