Skip to content

Conversation

@xabbuh
Copy link
Member

@xabbuh xabbuh commented Sep 25, 2025

Q A
Branch? 6.4
Bug fix? no
New feature? no
Deprecations? no
Issues
License MIT

see https://wiki.php.net/rfc/warnings-php-8-5#coercing_nan_to_other_types and php/php-src#19573

@carsonbot carsonbot added this to the 6.4 milestone Sep 25, 2025
@carsonbot carsonbot changed the title do not coerce NAN to other types do not coerce NAN to other types Sep 25, 2025
$cursor->attr = [];
$type = \gettype($item);
if ($item && 'array' === $type) {
if ('array' === $type && $item) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is probably not the only place where coercing NAN to bool can bite us, but it's the only placed caught by our test suite

@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit 6e4ed58 into symfony:6.4 Sep 25, 2025
8 of 11 checks passed
@xabbuh xabbuh deleted the php-19573 branch September 25, 2025 17:21
@fabpot fabpot mentioned this pull request Sep 27, 2025
@fabpot fabpot mentioned this pull request Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants