Skip to content

Commit 4bf5d2f

Browse files
committed
bug #4683 Fix compatibility layer (fabpot)
This PR was merged into the 3.x branch. Discussion ---------- Fix compatibility layer Closes #4652 Commits ------- 806049f Fix compatibility layer
2 parents 9c94bfe + 806049f commit 4bf5d2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ExpressionParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public function parseArguments()
214214
{
215215
trigger_deprecation('twig/twig', '3.19', \sprintf('The "%s()" method is deprecated, use "Twig\ExpressionParser\Infix\ArgumentsTrait::parseNamedArguments()" instead.', __METHOD__));
216216

217-
$parsePrimary = new \ReflectionMethod($this->parser, 'parsePrimary');
217+
$parsePrimaryExpression = new \ReflectionMethod($this->parser, 'parsePrimaryExpression');
218218

219219
$namedArguments = false;
220220
$definition = false;
@@ -263,7 +263,7 @@ public function parseArguments()
263263
$name = $value->getAttribute('name');
264264

265265
if ($definition) {
266-
$value = $parsePrimary->invoke($this->parser);
266+
$value = $parsePrimaryExpression->invoke($this->parser);
267267

268268
if (!$this->checkConstantExpression($value)) {
269269
throw new SyntaxError('A default value for an argument must be a constant (a boolean, a string, a number, a sequence, or a mapping).', $token->getLine(), $stream->getSourceContext());

0 commit comments

Comments
 (0)