From 17bc095dd1d05c29f71905578f03be7f68e3aab2 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 5 Aug 2008 22:22:07 +0000 Subject: [PATCH] Fix notice about body not having chunk formatting. Props santosj. see #4779 git-svn-id: https://develop.svn.wordpress.org/trunk@8560 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/http.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/http.php b/wp-includes/http.php index 8b6b93e7af..1a4b408036 100644 --- a/wp-includes/http.php +++ b/wp-includes/http.php @@ -796,7 +796,9 @@ class WP_Http_ExtHTTP { list($theHeaders, $theBody) = explode("\r\n\r\n", $strResponse, 2); $theHeaders = WP_Http::processHeaders($theHeaders); - $theBody = http_chunked_decode($theBody); + + if ( !empty($theBody) ) + $theBody = http_chunked_decode($theBody); $theResponse = array(); $theResponse['code'] = $info['response_code'];