[wp-trac] [WordPress Trac] #37097: Requests: Return array from WP_Http::request for compatibility

WordPress Trac noreply at wordpress.org
Wed Jul 6 17:50:45 UTC 2016


#37097: Requests: Return array from WP_Http::request for compatibility
-----------------------------+---------------------
 Reporter:  rmccue           |       Owner:  rmccue
     Type:  defect (bug)     |      Status:  closed
 Priority:  highest omg bbq  |   Milestone:  4.6
Component:  HTTP API         |     Version:  trunk
 Severity:  normal           |  Resolution:  fixed
 Keywords:  has-patch        |     Focuses:
-----------------------------+---------------------
Changes (by rmccue):

 * owner:   => rmccue
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"37989"]:
 {{{
 #!CommitTicketReference repository="" revision="37989"
 HTTP API: Switch back to returning an array.

 The array-compatibility object we started returning in r37428
 unfortunately isn't enough like an array. In particular, `is_array()`
 checks fail, despite the object implementing ArrayAccess. Mea culpa.

 This moves the WP_HTTP_Response object to a new http_response key in the
 array, and changes the value back to an actual array.

 Fixes #37097.
 See #33055.
 }}}

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


More information about the wp-trac mailing list