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

WordPress Trac noreply at wordpress.org
Wed Feb 9 19:32:23 UTC 2022


#55130: Invalid syntax to access object keys
--------------------------+-----------------------------
 Reporter:  mmaattiiaass  |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  5.9
 Severity:  normal        |   Keywords:
  Focuses:  rest-api      |
--------------------------+-----------------------------
 In the prepare_item_for_database method of the
 WP_REST_Global_Styles_Controller class we are treating the $request
 variable as an array when it is an object, so we need to change the way we
 access their properties.

 Example:

 {{{
 $request->styles
 }}}
  instead of
 {{{
 $request['styles']
 }}}

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


More information about the wp-trac mailing list