mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-09 09:57:38 +01:00
Use _http_build_query() if PHP version < 5.1.2. Props hakre. fixes #9044
git-svn-id: http://svn.automattic.com/wordpress/trunk@11143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
657826a931
commit
36eee06eb3
@ -281,7 +281,10 @@ class WP_Http {
|
||||
$transports = WP_Http::_getTransport($r);
|
||||
} else {
|
||||
if ( is_array( $r['body'] ) || is_object( $r['body'] ) ) {
|
||||
$r['body'] = http_build_query($r['body'], null, '&');
|
||||
if ( ! version_compare(phpversion(), '5.1.2', '>=') )
|
||||
$r['body'] = _http_build_query($r['body'], null, '&');
|
||||
else
|
||||
$r['body'] = http_build_query($r['body'], null, '&');
|
||||
$r['headers']['Content-Type'] = 'application/x-www-form-urlencoded; charset=' . get_option('blog_charset');
|
||||
$r['headers']['Content-Length'] = strlen($r['body']);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user