[wp-trac] [WordPress Trac] #37097: Return array from WP_Http::request for compatibility
WordPress Trac
noreply at wordpress.org
Tue Jun 14 02:37:32 UTC 2016
#37097: Return array from WP_Http::request for compatibility
--------------------------+-----------------------
Reporter: rmccue | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.6
Component: HTTP API | Version: trunk
Severity: normal | Keywords: has-patch
Focuses: |
--------------------------+-----------------------
As we noticed in #33055, a lot of people are checking `is_array` directly
on the response from this function. This means that our compatibility shim
with ArrayAccess breaks.
Let's switch this back to an array, but keep the new object around. I want
to encourage the `WP_HTTP_Response` object as much as possible.
Attached patch changes format back to an array, now with a new
`http_response` key containing the `WP_HTTP_Requests_Response` object. It
also removes the `ArrayAccess` implementation as we no longer need it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37097>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list