From 5183bee7389b0272fe3b9034bebae76e725943bc Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 18 Nov 2010 03:34:28 +0000 Subject: [PATCH] WP_Http_ExtHTTP variable fix. Don't pass an empty array to http_request, props mdawaffe, fixes #13730. git-svn-id: https://develop.svn.wordpress.org/trunk@16450 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-http.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index 70feea8462..9809c480ed 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -280,6 +280,7 @@ class WP_Http { $r['headers']['Accept-Encoding'] = WP_Http_Encoding::accept_encoding(); if ( empty($r['body']) ) { + $r['body'] = null; // Some servers fail when sending content without the content-length header being set. // Also, to fix another bug, we only send when doing POST and PUT and the content-length // header isn't already set.