[2.0] unclosed "verbatim" block should be litteraly written

Fixes #1654
cc @SpacePossum
This commit is contained in:
Alain Tiemblo
2015-03-16 22:54:30 +01:00
parent 204f253173
commit 4ea47499ed
+1 -1
View File
@@ -288,7 +288,7 @@ class Twig_Lexer
protected function lexRawData()
{
if (!preg_match($this->regexes['lex_raw_data'], $this->code, $match, PREG_OFFSET_CAPTURE, $this->cursor)) {
throw new Twig_Error_Syntax(sprintf('Unexpected end of file: Unclosed "%s" block', $tag), $this->lineno, $this->filename);
throw new Twig_Error_Syntax('Unexpected end of file: Unclosed "verbatim" block', $this->lineno, $this->filename);
}
$text = substr($this->code, $this->cursor, $match[0][1] - $this->cursor);