-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Stop using == '' with regard to PHP 8 #2294
Conversation
For reference, this is the RFC: https://wiki.php.net/rfc/string_to_number_comparison If I get this correctly many of the comparisons in this PR are actually comparing strings where What about |
Most of these checks are boolen checks like |
Well I'm thinking about all the "boolean" values or numbers with an empty state from the db that we get via dbal/models. Things like I'd rather see them written like this: $objComments->addReply === '1'
$objComments->addReply === ''
$objParent->start !== '' && $objParent->start > $time |
What if someone sets |
Ah, you got a point there. |
What about Do we have any relevant cases of this as well in the codebase? |
We have one |
See https://3v4l.org/XfAXs