[wp-trac] [WordPress Trac] #37722: wp_remote_retrieve_headers no longer an array in WordPress 4.6

WordPress Trac noreply at wordpress.org
Thu Aug 18 17:53:44 UTC 2016


#37722: wp_remote_retrieve_headers no longer an array in WordPress 4.6
-------------------------+-----------------------------
 Reporter:  jstkrn       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  HTTP API     |    Version:  4.6
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 With the introduction of Requests in PHP 4.6, headers are returned as a
 `Requests_Utility_CaseInsensitiveDictionary` object instead of a native
 PHP array, see `wp-includes/class-wp-http-requests-response.php >
 get_headers`. Although this object implements `ArrayAccess`, it
 technically is no longer an array and this causes a plugin of mine to
 break due to incompatible types, as I assert that an array is given.

 Documentation and docblocks needs to be updated to reflect this change.

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


More information about the wp-trac mailing list