[wp-trac] [WordPress Trac] #13730: http_request() fails when passed an array for the $body parameter
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 4 20:17:26 UTC 2010
#13730: http_request() fails when passed an array for the $body parameter
--------------------------+-------------------------------------------------
Reporter: mdawaffe | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version:
Severity: normal | Keywords: has-patch
--------------------------+-------------------------------------------------
Passing an empty array to WP_Http::request in the body argument causes an
error if the WP_Http_ExtHTTP transport is used:
{{{
WP_Http::request( $url, array( 'body' => array() ) );
}}}
Since the body is empty, it gets ignored and so does not get converted
into a (string) http query; it's passed straight into
{{{
@http_request($r['method'], $url, $r['body'], $options, $info);
}}}
Which causes an error.
Attached sets empty bodies to the default (null).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13730>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list