Always cast the 'code' server response to an int, this provides consistency between both of the HTTP transports.
Previously cURL would return an int and Streams a numeric string. Fixes #28887 git-svn-id: https://develop.svn.wordpress.org/trunk@29849 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2ed0d6cae0
commit
60b8ed120a
@ -524,6 +524,9 @@ class WP_Http {
|
|||||||
$cookies[] = new WP_Http_Cookie( $value, $url );
|
$cookies[] = new WP_Http_Cookie( $value, $url );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cast the Response Code to an int
|
||||||
|
$response['code'] = intval( $response['code'] );
|
||||||
|
|
||||||
return array('response' => $response, 'headers' => $newheaders, 'cookies' => $cookies);
|
return array('response' => $response, 'headers' => $newheaders, 'cookies' => $cookies);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user