From 60b8ed120af2d7af8db8a9e28284d69d97b26058 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Wed, 8 Oct 2014 05:20:01 +0000 Subject: [PATCH] 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 --- src/wp-includes/class-http.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-includes/class-http.php b/src/wp-includes/class-http.php index 3cfdee4a93..232ef69c3b 100644 --- a/src/wp-includes/class-http.php +++ b/src/wp-includes/class-http.php @@ -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); }