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 Built from https://develop.svn.wordpress.org/trunk@29849 git-svn-id: http://core.svn.wordpress.org/trunk@29612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
88ceaba2d2
commit
88b635245a
|
@ -524,6 +524,9 @@ class WP_Http {
|
|||
$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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue