Changeset 45504
- Timestamp:
- 06/08/2019 05:09:02 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-http.php
r45135 r45504 273 273 274 274 if ( empty( $url ) || empty( $arrURL['scheme'] ) ) { 275 return new WP_Error( 'http_request_failed', __( 'A valid URL was not provided.' ) ); 275 $response = new WP_Error( 'http_request_failed', __( 'A valid URL was not provided.' ) ); 276 /** This action is documented in wp-includes/class-http.php */ 277 do_action( 'http_api_debug', $response, 'response', 'Requests', $r, $url ); 278 return $response; 276 279 } 277 280 278 281 if ( $this->block_request( $url ) ) { 279 return new WP_Error( 'http_request_failed', __( 'User has blocked requests through HTTP.' ) ); 282 $response = new WP_Error( 'http_request_not_executed', __( 'User has blocked requests through HTTP.' ) ); 283 /** This action is documented in wp-includes/class-http.php */ 284 do_action( 'http_api_debug', $response, 'response', 'Requests', $r, $url ); 285 return $response; 280 286 } 281 287 … … 290 296 $r['blocking'] = true; 291 297 if ( ! wp_is_writable( dirname( $r['filename'] ) ) ) { 292 return new WP_Error( 'http_request_failed', __( 'Destination directory for file streaming does not exist or is not writable.' ) ); 298 $response = new WP_Error( 'http_request_failed', __( 'Destination directory for file streaming does not exist or is not writable.' ) ); 299 /** This action is documented in wp-includes/class-http.php */ 300 do_action( 'http_api_debug', $response, 'response', 'Requests', $r, $url ); 301 return $response; 293 302 } 294 303 }
Note: See TracChangeset
for help on using the changeset viewer.