-
-
Notifications
You must be signed in to change notification settings - Fork 531
Fix fatal error in trim output filter #16757
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
base: 3.x
Are you sure you want to change the base?
Conversation
@jenswittmann does that happen outside of pdotools? |
Yes, you can try this with a Snippet that return an Array:
When you use |
@smg6511 here's a real-world example that might not work with the discussed fix maybe 🤔 Check if the user has a name in a custom session variable and output a link based on it:
Every output modifier gets trimmed in line 66. So, with return, you always get the else value, right? |
@jenswittmann - No, I did some tests with |
@jenswittmann Hi again, Jens. SInce you were active earlier today (on the file browser update I did), I thought I'd see if you wanted to take a second look and consider implementing the changes I'd suggested for your PR here. Then I can re-review and maybe we can get this one merged in soon as well ;-) |
Co-authored-by: Jim Graham <[email protected]>
@smg6511 can confirm that both suggestion fixed it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
This solves a PHP fatal error that occurs when using something like this:
[[!#SESSION.user.password:trim]]
PHP Error
System