-
Notifications
You must be signed in to change notification settings - Fork 714
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
3.1.31 potentially breaks if statement order #347
Comments
The fix is now in the master branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As described on the forums here: http://www.smarty.net/forums/viewtopic.php?p=92056#92056 the bugfix applied here b8acd7e potentially breaks the processing order of if statements.
Let me re-describe:
Assuming I have a class with a has($key) and a get($key) method, where the get() method throws an exception if $key does not exist in the internal stack. If I then build the following if statement with smarty, the get() exception will be triggered with 3.1.31, but not with 3.1.30 or 3.1.29.
The variable prefixing done by the php function parser for empty() function calls will convert the statement into
Which totally breaks the original handling of if statements, as the empty() call would never have to be executed if the key does not exist.
The text was updated successfully, but these errors were encountered: