removed obsolete code

This commit is contained in:
Fabien Potencier
2010-10-01 12:08:57 +02:00
parent e4d3f43664
commit 5198d20bb1
+1 -3
View File
@@ -21,9 +21,7 @@ class Twig_TokenParser_Display extends Twig_TokenParser
{
$lineno = $token->getLine();
$name = $this->parser->getStream()->expect(Twig_Token::NAME_TYPE)->getValue();
if (!$this->parser->hasBlock($name)) {
throw new Twig_SyntaxError("The block '$name' cannot be displayed as it has not yet been defined", $lineno);
}
$this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
return new Twig_Node_BlockReference($name, $lineno, $this->getTag());