- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-http-requests-response.php
r41162 r42343 163 163 $cookies = array(); 164 164 foreach ( $this->response->cookies as $cookie ) { 165 $cookies[] = new WP_Http_Cookie( array( 166 'name' => $cookie->name, 167 'value' => urldecode( $cookie->value ), 168 'expires' => isset( $cookie->attributes['expires'] ) ? $cookie->attributes['expires'] : null, 169 'path' => isset( $cookie->attributes['path'] ) ? $cookie->attributes['path'] : null, 170 'domain' => isset( $cookie->attributes['domain'] ) ? $cookie->attributes['domain'] : null, 171 )); 165 $cookies[] = new WP_Http_Cookie( 166 array( 167 'name' => $cookie->name, 168 'value' => urldecode( $cookie->value ), 169 'expires' => isset( $cookie->attributes['expires'] ) ? $cookie->attributes['expires'] : null, 170 'path' => isset( $cookie->attributes['path'] ) ? $cookie->attributes['path'] : null, 171 'domain' => isset( $cookie->attributes['domain'] ) ? $cookie->attributes['domain'] : null, 172 ) 173 ); 172 174 } 173 175 … … 184 186 public function to_array() { 185 187 return array( 186 'headers' => $this->get_headers(),187 'body' => $this->get_data(),188 'headers' => $this->get_headers(), 189 'body' => $this->get_data(), 188 190 'response' => array( 189 191 'code' => $this->get_status(), 190 192 'message' => get_status_header_desc( $this->get_status() ), 191 193 ), 192 'cookies' => $this->get_cookies(),194 'cookies' => $this->get_cookies(), 193 195 'filename' => $this->filename, 194 196 );
Note: See TracChangeset
for help on using the changeset viewer.