From: Fabien Potencier Date: Wed, 22 Dec 2010 10:33:29 +0000 (+0100) Subject: fixed typo X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=592834f7f6c12f99af0d93d8ec7d025a875703d6;p=web%2Fkonrad%2Ftwig.git fixed typo --- diff --git a/lib/Twig/ExpressionParser.php b/lib/Twig/ExpressionParser.php index 2a61583..bba2ae3 100644 --- a/lib/Twig/ExpressionParser.php +++ b/lib/Twig/ExpressionParser.php @@ -204,6 +204,7 @@ class Twig_ExpressionParser public function parsePostfixExpression($node) { + $firstPass = true; while (true) { $token = $this->parser->getCurrentToken(); if ($token->getType() == Twig_Token::PUNCTUATION_TYPE) { @@ -211,14 +212,16 @@ class Twig_ExpressionParser $node = $this->parseSubscriptExpression($node); } elseif ('|' == $token->getValue()) { $node = $this->parseFilterExpression($node); - } elseif ($node instanceof Twig_Node_Expression_Name && '(' == $token->getValue()) { - return new Twig_Node_Expression_Function($node, $this->parseArguments(), $node->getLine()); + } elseif ($firstPass && $node instanceof Twig_Node_Expression_Name && '(' == $token->getValue()) { + $node = new Twig_Node_Expression_Function($node, $this->parseArguments(), $node->getLine()); } else { break; } } else { break; } + + $firstPass = false; } return $node;