diff --git wp-includes/class-http.php wp-includes/class-http.php
index c75b47e..fbf0e80 100644
|
|
class WP_Http { |
256 | 256 | static $transports = array(); |
257 | 257 | |
258 | 258 | $class = $this->_get_first_available_transport( $args, $url ); |
259 | | if ( !$class ) |
260 | | return new WP_Error( 'http_failure', __( 'There are no HTTP transports available which can complete the requested request.' ) ); |
| 259 | if ( !$class ) { |
| 260 | $response = new WP_Error( 'http_failure', __( 'There are no HTTP transports available which can complete the requested request.' ) ); |
| 261 | } else { |
| 262 | |
| 263 | // Transport claims to support request, instantiate it and give it a whirl. |
| 264 | if ( empty( $transports[$class] ) ) |
| 265 | $transports[$class] = new $class; |
261 | 266 | |
262 | | // Transport claims to support request, instantiate it and give it a whirl. |
263 | | if ( empty( $transports[$class] ) ) |
264 | | $transports[$class] = new $class; |
| 267 | $response = $transports[$class]->request( $url, $args ); |
265 | 268 | |
266 | | $response = $transports[$class]->request( $url, $args ); |
| 269 | } |
267 | 270 | |
268 | 271 | do_action( 'http_api_debug', $response, 'response', $class, $args, $url ); |
269 | 272 | |