Make WordPress Core

Ticket #16752: 16752.patch

File 16752.patch, 1.5 KB (added by hakre, 15 years ago)
  • wp-includes/http.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    1919 *
    2020 * @return WP_Http HTTP Transport object.
    2121 */
    22 function &_wp_http_get_object() {
     22function _wp_http_get_object() {
    2323        static $http;
    2424
    2525        if ( is_null($http) )
     
    5656 * @return WP_Error|array The response or WP_Error on failure.
    5757 */
    5858function wp_remote_request($url, $args = array()) {
    59         $objFetchSite = _wp_http_get_object();
    60         return $objFetchSite->request($url, $args);
     59        return _wp_http_get_object()->request($url, $args);
    6160}
    6261
    6362/**
     
    7271 * @return WP_Error|array The response or WP_Error on failure.
    7372 */
    7473function wp_remote_get($url, $args = array()) {
    75         $objFetchSite = _wp_http_get_object();
    76         return $objFetchSite->get($url, $args);
     74        return _wp_http_get_object()->get($url, $args);
    7775}
    7876
    7977/**
     
    8886 * @return WP_Error|array The response or WP_Error on failure.
    8987 */
    9088function wp_remote_post($url, $args = array()) {
    91         $objFetchSite = _wp_http_get_object();
    92         return $objFetchSite->post($url, $args);
     89        return _wp_http_get_object()->post($url, $args);
    9390}
    9491
    9592/**
     
    104101 * @return WP_Error|array The response or WP_Error on failure.
    105102 */
    106103function wp_remote_head($url, $args = array()) {
    107         $objFetchSite = _wp_http_get_object();
    108         return $objFetchSite->head($url, $args);
     104        return _wp_http_get_object()->head($url, $args);
    109105}
    110106
    111107/**