fixed PHP 7.4 support

This commit is contained in:
Fabien Potencier
2019-05-14 08:10:36 +02:00
parent 7be8e9443d
commit 1fb0f9701d
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -1,5 +1,6 @@
* 1.41.0 (2019-XX-XX)
* fixed support for PHP 7.4
* added "filter", "map", and "reduce" filters (and support for arrow functions)
* fixed partial output leak when a PHP fatal error occurs
* optimized context access on PHP 7.4
+1 -1
View File
@@ -262,7 +262,7 @@ class Lexer implements \Twig_LexerInterface
if ($this->options['whitespace_trim'] === $this->positions[2][$this->position][0]) {
// whitespace_trim detected ({%-, {{- or {#-)
$text = rtrim($text);
} else {
} elseif ($this->options['whitespace_line_trim'] === $this->positions[2][$this->position][0]) {
// whitespace_line_trim detected ({%~, {{~ or {#~)
// don't trim \r and \n
$text = rtrim($text, " \t\0\x0B");