mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-05 23:17:26 +00:00
fixed PHP 7.4 support
This commit is contained in:
@@ -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
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user