mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
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
This commit is contained in:
parent
e4a40aa709
commit
92589dee21
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user