From 92589dee21967ace22f73ecb82f4a536c90a4b26 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 4 Aug 2008 19:12:26 +0000 Subject: [PATCH] Tests for whether is an array or an object before running http_build_query() on . Props santosj. fixes #7460 see #4779 git-svn-id: http://svn.automattic.com/wordpress/trunk@8536 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/http.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/http.php b/wp-includes/http.php index d447c93dd6..098f33499d 100644 --- a/wp-includes/http.php +++ b/wp-includes/http.php @@ -196,7 +196,7 @@ class WP_Http { $headers['user-agent'] = $r['user-agent']; if ( is_null($body) ) { - if ( ! is_string($body) ) + if ( is_array($body) || is_object($body) ) $body = http_build_query($body); $transports = WP_Http::_getTransport();