[Parser] removed useless else clause.

This commit is contained in:
Hugo Hamon
2012-04-23 18:00:48 +02:00
parent f79a56b431
commit 81a1049d7f
+2 -2
View File
@@ -350,9 +350,9 @@ class Twig_Parser implements Twig_ParserInterface
) {
if (false !== strpos((string) $node, chr(0xEF).chr(0xBB).chr(0xBF))) {
throw new Twig_Error_Syntax('A template that extends another one cannot have a body but a byte order mark (BOM) has been detected; it must be removed.', $node->getLine(), $this->stream->getFilename());
} else {
throw new Twig_Error_Syntax('A template that extends another one cannot have a body.', $node->getLine(), $this->stream->getFilename());
}
throw new Twig_Error_Syntax('A template that extends another one cannot have a body.', $node->getLine(), $this->stream->getFilename());
}
// bypass "set" nodes as they "capture" the output