added missing else clause to avoid infinite loops

This commit is contained in:
Fabien Potencier
2018-03-04 10:39:51 -08:00
parent ab6c99e707
commit de2be6a0ee
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -1,5 +1,6 @@
* 1.35.3 (2018-XX-XX)
* added missing else clause to avoid infinite loops
* fixed .. (range operator) in sandbox policy
* 1.35.2 (2018-03-03)
+3
View File
@@ -343,6 +343,9 @@ class Twig_Lexer implements Twig_LexerInterface
$this->popState();
++$this->cursor;
} else {
// unlexable
throw new Twig_Error_Syntax(sprintf('Unexpected character "%s".', $this->code[$this->cursor]), $this->lineno, $this->source);
}
}