Ticket #37722: 37722.3.diff
File 37722.3.diff, 1.1 KB (added by , 8 years ago) |
---|
-
wp-includes/class-wp-http-requests-response.php
63 63 * Retrieves headers associated with the response. 64 64 * 65 65 * @since 4.6.0 66 * @since 4.7.0 Return value changed to Requests_Utility_CaseInsensitiveDictionary from array. 66 67 * @access public 67 68 * 68 * @return array Map of header name to header value. 69 * @see \Requests_Utility_CaseInsensitiveDictionary 70 * 71 * @return \Requests_Utility_CaseInsensitiveDictionary Map of header name to header value. 69 72 */ 70 73 public function get_headers() { 71 // Ensure headers remain case-insensitive 74 // Ensure headers remain case-insensitive. 72 75 $converted = new Requests_Utility_CaseInsensitiveDictionary(); 73 76 74 77 foreach ( $this->response->headers->getAll() as $key => $value ) { 75 78 if ( count( $value ) === 1 ) { 76 79 $converted[ $key ] = $value[0]; 77 } 78 else { 80 } else { 79 81 $converted[ $key ] = $value; 80 82 } 81 83 }