[wp-trac] [WordPress Trac] #55222: PHP Warning when using 'do_parse_request' filter with '__return_false'

WordPress Trac noreply at wordpress.org
Sat Feb 26 14:26:35 UTC 2022


#55222: PHP Warning when using 'do_parse_request' filter with '__return_false'
--------------------------+-----------------------------
 Reporter:  dd32          |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  6.0
Component:  Query         |     Version:
 Severity:  minor         |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"52804" 52804]:
 {{{
 #!CommitTicketReference repository="" revision="52804"
 Query: Preinitialize the `WP` class properties to their default values.

 This avoids an `array_keys() expects parameter 1 to be array, null given`
 PHP warning for the `query_vars` property in `WP::build_query_string()`
 when disabling request parsing via the `do_parse_request` filter.

 Props dd32, SergeyBiryukov.
 Fixes #55222.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55222#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list