WordPress.org

Make WordPress Core

Ticket #10231: 10231.diff

File 10231.diff, 773 bytes (added by Denis-de-Bernardy, 6 years ago)
  • wp-includes/http.php

     
    235235 
    236236                $r = wp_parse_args( $args, $defaults ); 
    237237                $r = apply_filters( 'http_request_args', $r, $url ); 
     238                 
     239                if ( is_wp_error($r) ) 
     240                        return $r; 
    238241 
    239242                $arrURL = parse_url($url); 
    240243 
    241244                if ( $this->block_request( $url ) ) 
    242                         return new WP_Error('http_request_failed', 'User has blocked requests through HTTP.'); 
     245                        return new WP_Error('http_request_failed', __('User has blocked requests through HTTP.')); 
    243246 
    244247                // Determine if this is a https call and pass that on to the transport functions 
    245248                // so that we can blacklist the transports that do not support ssl verification