[wp-trac] [WordPress Trac] #53635: PHP 8.1: various compatibility fixes
WordPress Trac
noreply at wordpress.org
Mon Sep 13 18:54:13 UTC 2021
#53635: PHP 8.1: various compatibility fixes
-------------------------------------------------+-------------------------
Reporter: SergeyBiryukov | Owner:
| hellofromTonya
Type: task (blessed) | Status: accepted
Priority: normal | Milestone: 5.9
Component: General | Version:
Severity: normal | Resolution:
Keywords: php81 has-patch has-unit-tests | Focuses: coding-
commit | standards
-------------------------------------------------+-------------------------
Comment (by hellofromTonya):
In [changeset:"51806" 51806]:
{{{
#!CommitTicketReference repository="" revision="51806"
Code Modernization: Fix "passing null to non-nullable" deprecation notice
in `WP_Comment_Query::get_comment_ids()`.
The `WP_Comment_Query::get_comment_ids()` method is supposed to handle
`null` as a search query, but was throwing a `strlen(): Passing null to
parameter #1 ($string) of type string is deprecated` notice on PHP 8.1.
Discovered via and already covered via the pre-existing
`Tests_Comment_Query::test_search_null_should_be_ignored()` test method.
Follow-up to [36345], [48275].
Props jrf, hellofromTonya.
See #53635.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53635#comment:105>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list