[wp-trac] [WordPress Trac] #50913: PHP 8.0: various compatibility fixes
WordPress Trac
noreply at wordpress.org
Wed Sep 9 12:41:07 UTC 2020
#50913: PHP 8.0: various compatibility fixes
-------------------------------------------+-------------------------------
Reporter: jrf | Owner: SergeyBiryukov
Type: task (blessed) | Status: reviewing
Priority: normal | Milestone: 5.6
Component: General | Version:
Severity: normal | Resolution:
Keywords: php8 has-patch needs-dev-note | Focuses: coding-standards
-------------------------------------------+-------------------------------
Comment (by jrf):
Replying to [comment:16 andraganescu]:
> While testing on PHP 8 I found that any page (home or archive) will
return 404 as if there were no posts available. The problem appears to be
in `wp-includes/class-wp-query.php` at line `762`, where the new
[https://wiki.php.net/rfc/string_to_number_comparison Saner string to
number comparisons] makes it so that `"" < 0 === true`, so `$qv['p'] < 0`
is `true` since the default for `$qv['p']` is `string(0)`.
This was already fixed in [48960]
(https://core.trac.wordpress.org/ticket/50913#comment:10)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50913#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list