WordPress.org

Make WordPress Core

Changeset 8544


Ignore:
Timestamp:
08/05/08 04:14:55 (7 years ago)
Author:
ryan
Message:

Fix reversed encoding. Props DD32. see #4779

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/http.php

    r8536 r8544  
    186186        $r = wp_parse_args( $args, $defaults ); 
    187187 
    188         if ( ! is_null($headers) && ! is_array($headers) ) { 
     188        if ( is_null($headers) ) 
     189            $headers = array(); 
     190 
     191        if ( ! is_array($headers) ) { 
    189192            $processedHeaders = WP_Http::processHeaders($headers); 
    190193            $headers = $processedHeaders['headers']; 
    191         } else { 
    192             $headers = array(); 
    193194        } 
    194195 
     
    197198 
    198199        if ( is_null($body) ) { 
     200            $transports = WP_Http::_getTransport(); 
     201        } else { 
    199202            if ( is_array($body) || is_object($body) ) 
    200203                $body = http_build_query($body); 
    201204 
    202             $transports = WP_Http::_getTransport(); 
    203         } else 
    204205            $transports = WP_Http::_postTransport(); 
     206        } 
    205207 
    206208        $response = array( 'headers' => array(), 'body' => '', 'response' => array('code', 'message') ); 
Note: See TracChangeset for help on using the changeset viewer.