WordPress.org

Make WordPress Core

Ticket #7460: 4779.r8535.diff

File 4779.r8535.diff, 403 bytes (added by santosj, 13 years ago)

Tests for whether $body is an array or an object before running http_build_query() on $body. Based off of r8535

  • http.php

     
    196196                        $headers['user-agent'] = $r['user-agent'];
    197197
    198198                if ( is_null($body) ) {
    199                         if ( ! is_string($body) )
     199                        if ( is_array($body) || is_object($body) )
    200200                                $body = http_build_query($body);
    201201
    202202                        $transports = WP_Http::_getTransport();