Update WP and plugins

This commit is contained in:
Oliver Davies 2019-04-16 20:56:22 +01:00
parent 10a4713229
commit 1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions

View file

@ -162,13 +162,15 @@ class WP_HTTP_Requests_Response extends WP_HTTP_Response {
public function get_cookies() {
$cookies = array();
foreach ( $this->response->cookies as $cookie ) {
$cookies[] = new WP_Http_Cookie( array(
'name' => $cookie->name,
'value' => urldecode( $cookie->value ),
'expires' => isset( $cookie->attributes['expires'] ) ? $cookie->attributes['expires'] : null,
'path' => isset( $cookie->attributes['path'] ) ? $cookie->attributes['path'] : null,
'domain' => isset( $cookie->attributes['domain'] ) ? $cookie->attributes['domain'] : null,
));
$cookies[] = new WP_Http_Cookie(
array(
'name' => $cookie->name,
'value' => urldecode( $cookie->value ),
'expires' => isset( $cookie->attributes['expires'] ) ? $cookie->attributes['expires'] : null,
'path' => isset( $cookie->attributes['path'] ) ? $cookie->attributes['path'] : null,
'domain' => isset( $cookie->attributes['domain'] ) ? $cookie->attributes['domain'] : null,
)
);
}
return $cookies;
@ -183,13 +185,13 @@ class WP_HTTP_Requests_Response extends WP_HTTP_Response {
*/
public function to_array() {
return array(
'headers' => $this->get_headers(),
'body' => $this->get_data(),
'headers' => $this->get_headers(),
'body' => $this->get_data(),
'response' => array(
'code' => $this->get_status(),
'message' => get_status_header_desc( $this->get_status() ),
),
'cookies' => $this->get_cookies(),
'cookies' => $this->get_cookies(),
'filename' => $this->filename,
);
}