Fix some minor issues

This commit is contained in:
Fabien Potencier
2024-08-16 22:51:19 +02:00
parent 5a66385a3f
commit 2e43eaa4ad
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -480,7 +480,7 @@ class ExpressionParser
case 'attribute':
$fakeNode = new Node(lineno: $line);
$fakeNode->setSourceContext($this->parser->getStream()->getSourceContext());
$fakeFunction = new TwigFunction('attribute', fn ($variable, $attribute, $arguments = []) => null);
$fakeFunction = new TwigFunction('attribute', fn ($variable, $attribute, $arguments = null) => null);
$args = (new CallableArgumentsExtractor($fakeNode, $fakeFunction))->extractArguments($this->parseArguments(true));
return new GetAttrExpression($args[0], $args[1], $args[2] ?? null, Template::ANY_CALL, $line);