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 some "Passing null to parameter" warnings (PHP8.1) #19135
Conversation
core/Twig.php
Outdated
@@ -360,6 +360,11 @@ protected function addFilter_notification() | |||
protected function addFilter_safeDecodeRaw() | |||
{ | |||
$rawSafeDecoded = new TwigFilter('rawSafeDecoded', function ($string) { | |||
|
|||
if (!$string) { |
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.
This one actually changes the result. The string 0
will no be returned as empty string. That can be seen in the UI test results. Maybe we need to check if it is a string
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.
Good point, or maybe we could just directly do $string === null
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.
@sgiehl PR has been updated
Thanks for the contribution @MichaelRoosz |
This fixes:
First priority was to keep the existing behavior to avoid creating any bugs.