Changeset 9142
- Timestamp:
- 10/13/2008 11:41:03 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/file.php
r9053 r9142 435 435 return new WP_Error('http_no_file', __('Could not create Temporary file')); 436 436 437 require_once( ABSPATH . 'wp-includes/class-snoopy.php' ); 438 $snoopy = new Snoopy(); 439 $snoopy->fetch($url); 440 441 if( $snoopy->status != '200' ){ 437 $response = wp_remote_get($url); 438 439 if( $response['response']['code'] != '200' ){ 442 440 fclose($handle); 443 441 unlink($tmpfname); 444 return new WP_Error('http_404', trim($ snoopy->response_code));445 } 446 fwrite($handle, $ snoopy->results);442 return new WP_Error('http_404', trim($response['response']['message'])); 443 } 444 fwrite($handle, $response['body']); 447 445 fclose($handle); 448 446
Note: See TracChangeset
for help on using the changeset viewer.