Make WordPress Core


Ignore:
Timestamp:
10/05/2016 03:50:54 AM (10 years ago)
Author:
dd32
Message:

HTTP: Document that the return value of wp_remote_retrieve_headers() changed from a simple array to an object which implements ArrayAccess.

Props mrahmadawais, sudar, swissspidy.
Fixes #37722

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-http-requests-response.php

    r38164 r38730  
    6666         * @access public
    6767         *
    68          * @return array Map of header name to header value.
     68         * @see \Requests_Utility_CaseInsensitiveDictionary
     69         *
     70         * @return \Requests_Utility_CaseInsensitiveDictionary Map of header name to header value.
    6971         */
    7072        public function get_headers() {
    71                 // Ensure headers remain case-insensitive
     73                // Ensure headers remain case-insensitive.
    7274                $converted = new Requests_Utility_CaseInsensitiveDictionary();
    7375
    … …  
    7577                        if ( count( $value ) === 1 ) {
    7678                                $converted[ $key ] = $value[0];
    77                         }
    78                         else {
     79                        } else {
    7980                                $converted[ $key ] = $value;
    8081                        }
Note: See TracChangeset for help on using the changeset viewer.