Skip to content

Commit 4535f12

Browse files
committed
bug #4633 Fix ExtensionSet usage of BinaryOperatorExpressionParser (VincentLanglet)
This PR was squashed before being merged into the 3.x branch. Discussion ---------- Fix ExtensionSet usage of BinaryOperatorExpressionParser This fix both issue of #4632 Commits ------- e14a247 Fix warning 00d29e6 Fix instantiation
2 parents 06eb9ea + e14a247 commit 4535f12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ExtensionSet.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,10 +507,10 @@ private function initExtension(ExtensionInterface $extension): void
507507
default => throw new \InvalidArgumentException(\sprintf('Invalid associativity "%s" for operator "%s".', $op['associativity'], $operator)),
508508
};
509509

510-
if ($op['callable']) {
510+
if (isset($op['callable'])) {
511511
$expressionParsers[] = $this->convertInfixExpressionParser($op['class'], $operator, $op['precedence'], $op['associativity'], $op['precedence_change'] ?? null, $op['aliases'] ?? [], $op['callable']);
512512
} else {
513-
$expressionParsers[] = new BinaryOperatorExpressionParser($op['class'], $operator, $op['precedence'], $op['associativity'], $op['precedence_change'] ?? null, $op['aliases'] ?? []);
513+
$expressionParsers[] = new BinaryOperatorExpressionParser($op['class'], $operator, $op['precedence'], $op['associativity'], $op['precedence_change'] ?? null, '', $op['aliases'] ?? []);
514514
}
515515
}
516516

0 commit comments

Comments
 (0)