[wp-trac] [WordPress Trac] #56948: (WordPress 6.1) Trying to access array offset on value of type int in wp-includes/class-wp-list-util.php on line 170

WordPress Trac noreply at wordpress.org
Wed Nov 2 05:27:44 UTC 2022


#56948: (WordPress 6.1) Trying to access array offset on value of type int in wp-
includes/class-wp-list-util.php on line 170
--------------------------+---------------------
 Reporter:  konyoldeath   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  6.1.1
Component:  Query         |     Version:  6.1
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+---------------------

Comment (by peterwilsoncc):

 At a guess, prior to priming the user cache in `WP_Query::the_post()`
 there will need to be a check for `WP_Post` objects, similar to that used
 in `WP_Query::setup_postdata()`.

 I think that will be safer than checking the type of fields requested as
 the check can remain consistent even if the `fields` argument of
 `WP_Query` is extended.

 Thanks for the report @konyoldeath!

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


More information about the wp-trac mailing list