Opened 8 months ago
Closed 8 months ago
#64047 closed defect (bug) (fixed)
PHP 8.5: NAN coercion warnings
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.9 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | General | Keywords: | php85 has-patch has-unit-tests |
| Focuses: | php-compatibility | Cc: |
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.
8 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