Tests for whether is an array or an object before running http_build_query() on . Props santosj. fixes #7460 see #4779

git-svn-id: https://develop.svn.wordpress.org/trunk@8536 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-08-04 19:12:26 +00:00
parent d64f028b60
commit 72e2ee06bb
1 changed files with 1 additions and 1 deletions

View File

@ -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();