[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 02:59:26 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:  Awaiting Review
Component:  General       |    Version:  6.1
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:                |
--------------------------+-----------------------------
 Hello,

 there is error on newest version of wordpress (6.1).

 Temporary, I was able to supress the error message by adding:
 if(!empty($value->$field)) **and** if(!empty($value[ $field ]))

 Reference:
 https://developer.wordpress.org/reference/classes/wp_list_util/pluck/

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


More information about the wp-trac mailing list