-
Notifications
You must be signed in to change notification settings - Fork 9
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
Twig variable parsing has issue. Can't assume "name" attribute exists for every node/expression #315
Comments
Thanks so much for identifying the source of this problem @DiegoPino . I puzzled at it for a while without realizing that the issue might be in Archipelago code. (I assumed it was a Twig version thing.) |
Thanks @patdunlavey. Testing and looking into this now. And yes, please report back on the "value" attribute. I'll see if I can reproduce as well. |
Hi @DiegoPino, can you share an example of an expression that fails? I'm having trouble reproducing. |
What?
There are many Twig compiler expressions that don't have certain properties. I already found a few (e.g Binary Operators). Checking on each class type makes no sense and getting a name attribute when non-existent throws an exception. The proper way is to use the method twig provides to see if a property exist. @aksm pulling code now and merging in a few bc this blocks any template that uses binary operators (and many other I have never used).
The text was updated successfully, but these errors were encountered: