소스 검색

[TwigBundle] fixed trans tag

Fabien Potencier 14 년 전
부모
커밋
6dc6d4a7d3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Symfony/Bundle/TwigBundle/TokenParser/TransTokenParser.php

+ 1 - 1
src/Symfony/Bundle/TwigBundle/TokenParser/TransTokenParser.php

@@ -50,7 +50,7 @@ class TransTokenParser extends \Twig_TokenParser
                     $stream->expect(\Twig_Token::BLOCK_END_TYPE);
                     $body = $this->parser->subparse(array($this, 'decideTransFork'), true);
                 }
-            } else {
+            } elseif (!$stream->test(\Twig_Token::BLOCK_END_TYPE)) {
                 throw new \Twig_SyntaxError(sprintf('Unexpected token. Twig was looking for the "from" keyword line %s)', $lineno), -1);
             }
         } else {