Opened 14 months ago
Closed 14 months ago
#64047 closed defect (bug) (fixed)
PHP 8.5: NAN coercion warnings
| Reported by: | swissspidy | Owned by: | swissspidy |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.9 |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | php85 has-patch has-unit-tests |
| Cc: | Focuses: | php-compatibility |
Description
Parent ticket for all things PHP 8.5: #63061
These are new warnings when testing against PHP 8.5. Should probably add some is_nan() checks or remove the edge case tests.
2) Tests_Media::test_wp_convert_bytes_to_hr The float NAN is not representable as an int, cast occurred /var/www/src/wp-includes/deprecated.php:3374 /var/www/tests/phpunit/tests/media.php:498 /var/www/vendor/bin/phpunit:122 9) Tests_Option_WpPrimeOptionCaches::test_get_option_should_return_identical_value_when_pre_primed_by_wp_prime_option_caches with data set "NAN" (NAN) unexpected NAN value was coerced to string /var/www/src/wp-includes/class-wpdb.php:1763 /var/www/src/wp-includes/option.php:1143 /var/www/tests/phpunit/tests/option/wpPrimeOptionCaches.php:251 /var/www/vendor/bin/phpunit:122
Change History (2)
This ticket was mentioned in PR #10078 on WordPress/wordpress-develop by @swissspidy.
14 months ago
#1
- Keywords has-patch has-unit-tests added; needs-patch removed
Note:
See TracTickets
for help on using tickets.
Trac ticket: https://core.trac.wordpress.org/ticket/64047