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:
Dion Hulse 2014-10-08 05:20:01 +00:00
parent 2ed0d6cae0
commit 60b8ed120a

View File

@ -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);
} }