Make WordPress Core

Changeset 11143


Ignore:
Timestamp:
04/30/2009 09:51:16 PM (17 years ago)
Author:
ryan
Message:

Use _http_build_query() if PHP version < 5.1.2. Props hakre. fixes #9044

File:
1 edited

Legend:

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

    r11091 r11143  
    282282        } else {
    283283            if ( is_array( $r['body'] ) || is_object( $r['body'] ) ) {
    284                 $r['body'] = http_build_query($r['body'], null, '&');
     284                if ( ! version_compare(phpversion(), '5.1.2', '>=') )
     285                    $r['body'] = _http_build_query($r['body'], null, '&');
     286                else
     287                    $r['body'] = http_build_query($r['body'], null, '&');
    285288                $r['headers']['Content-Type'] = 'application/x-www-form-urlencoded; charset=' . get_option('blog_charset');
    286289                $r['headers']['Content-Length'] = strlen($r['body']);
Note: See TracChangeset for help on using the changeset viewer.