mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-25 13:16:31 +00:00
Merge branch '2.x' into 3.x
* 2.x: Allow dev versions Allow PHP 8 for extra packages Fix Travis Bump version to 2.13 Fix integration tests Fix PHP 8 compat Install the phpunit-bridge with PHP 7.4 when testing nightly Add PHP 8 / nightly in Travis matrix Drop support for PHP 7.0
This commit is contained in:
@@ -258,7 +258,8 @@ abstract class CallExpression extends AbstractExpression
|
||||
$isPhpVariadic = false;
|
||||
if ($isVariadic) {
|
||||
$argument = end($parameters);
|
||||
if ($argument && $argument->isArray() && $argument->isDefaultValueAvailable() && [] === $argument->getDefaultValue()) {
|
||||
$isArray = $argument && $argument->hasType() && 'array' === $argument->getType()->getName();
|
||||
if ($isArray && $argument->isDefaultValueAvailable() && [] === $argument->getDefaultValue()) {
|
||||
array_pop($parameters);
|
||||
} elseif ($argument && $argument->isVariadic()) {
|
||||
array_pop($parameters);
|
||||
|
||||
Reference in New Issue
Block a user