mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-18 12:42:29 +00:00
e56cdfdded
This PR was merged into the 3.x branch.
Discussion
----------
Fix null coalescing operator with imported macros
Closes #4776
When using the null coalescing operator with a macro imported via the `from` tag, the `TemplateVariable` node inside `MacroReferenceExpression` was deep-cloned, causing the clone to generate a different `$macros` key than the one assigned by `AssignTemplateVariable`. This resulted in a `Call to a member function hasMacro() on null` error.
Commits
-------
efa004caab Fix null coalescing operator with imported macros