mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-12 18:36:53 +00:00
Merge branch '1.x' into 2.x
* 1.x: fixed deprecation under PHP 7.4 fixed PHP 7.4 support added PHP 7.4 in Travis config
This commit is contained in:
@@ -22,6 +22,7 @@ jobs:
|
||||
- php: 7.1
|
||||
- php: 7.2
|
||||
- php: 7.3
|
||||
- php: 7.4snapshot
|
||||
- stage: integration tests
|
||||
php: 7.3
|
||||
script: ./drupal_test.sh
|
||||
|
||||
@@ -227,6 +227,7 @@
|
||||
|
||||
* 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
@@ -233,7 +233,7 @@ class Lexer
|
||||
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");
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ class Node implements \Countable, \IteratorAggregate
|
||||
{
|
||||
foreach ($nodes as $name => $node) {
|
||||
if (!$node instanceof self) {
|
||||
throw new \InvalidArgumentException(sprintf('Using "%s" for the value of node "%s" of "%s" is not supported. You must pass a \Twig\Node\Node instance.', \is_object($node) ? \get_class($node) : null === $node ? 'null' : \gettype($node), $name, \get_class($this)));
|
||||
throw new \InvalidArgumentException(sprintf('Using "%s" for the value of node "%s" of "%s" is not supported. You must pass a \Twig\Node\Node instance.', \is_object($node) ? \get_class($node) : (null === $node ? 'null' : \gettype($node)), $name, \get_class($this)));
|
||||
}
|
||||
}
|
||||
$this->nodes = $nodes;
|
||||
|
||||
Reference in New Issue
Block a user