[wp-trac] [WordPress Trac] #55130: Invalid syntax to access object keys

WordPress Trac noreply at wordpress.org
Wed Feb 9 19:41:16 UTC 2022


#55130: Invalid syntax to access object keys
--------------------------+-----------------------
 Reporter:  mmaattiiaass  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  REST API      |     Version:  5.9
 Severity:  normal        |  Resolution:  invalid
 Keywords:  has-patch     |     Focuses:  rest-api
--------------------------+-----------------------
Changes (by TimothyBlynJacobs):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  5.9.1 =>


Comment:

 Welcome to trac @mmaattiiaass and thanks for the ticket!

 The `WP_REST_Request` object implements `ArrayAccess` so this syntax is
 correct and intentionally how we want to access request data. See
 [https://developer.wordpress.org/reference/classes/wp_rest_request/#description
 the developer docs] for more details.

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


More information about the wp-trac mailing list