Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a PHP fatal error when calling a macro, imported in the template, in another macro #3009

Merged
merged 1 commit into from May 16, 2019

Conversation

@fabpot
Copy link
Contributor

commented May 16, 2019

The current code iterates over all imported functions (traversing all the scopes). So, the macro was found at compilation time, but didn't work at runtime, leading to a PHP fatal error. Now, you get a proper exception at compilation time.

@fabpot fabpot merged commit ba9b968 into twigphp:1.x May 16, 2019

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
fabpot added a commit that referenced this pull request May 16, 2019
bug #3009 Fix a PHP fatal error when calling a macro, imported in the…
… template, in another macro (fabpot)

This PR was merged into the 1.x branch.

Discussion
----------

Fix a PHP fatal error when calling a macro, imported in the template, in another macro

The current code iterates over all imported functions (traversing all the scopes). So, the macro was found at compilation time, but didn't work at runtime, leading to a PHP fatal error. Now, you get a proper exception at compilation time.

Commits
-------

ba9b968 fixed a PHP fatal error when calling a macro, imported in the template, in another macro

@fabpot fabpot deleted the fabpot:macro-scope-fix branch May 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.