Changeset 8644
- Timestamp:
- 08/13/2008 11:37:42 PM (16 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/http.php
r8634 r8644 464 464 $error_reporting = error_reporting(0); 465 465 466 $handle = fsockopen($arrURL['host'], $arrURL['port'], $iError, $strError, $r['timeout'] ); 466 if ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === WP_DEBUG ) ) 467 $handle = @fsockopen($arrURL['host'], $arrURL['port'], $iError, $strError, $r['timeout'] ); 468 else 469 $handle = fsockopen($arrURL['host'], $arrURL['port'], $iError, $strError, $r['timeout'] ); 467 470 468 471 if ( false === $handle ) 469 472 return new WP_Error('http_request_failed', $iError . ': ' . $strError); 473 474 // WordPress supports PHP 4.3, which has this function. Removed sanity 475 // checking for performance reasons. 476 stream_set_timeout($handle, $r['timeout'] ); 470 477 471 478 $requestPath = $arrURL['path'] . ( isset($arrURL['query']) ? '?' . $arrURL['query'] : '' ); … … 602 609 return new WP_Error('http_request_failed', sprintf(__('Could not open handle for fopen() to %s'), $url)); 603 610 604 if ( function_exists('stream_set_timeout') ) 605 stream_set_timeout($handle, $r['timeout'] ); 611 // WordPress supports PHP 4.3, which has this function. Removed sanity 612 // checking for performance reasons. 613 stream_set_timeout($handle, $r['timeout'] ); 606 614 607 615 if ( ! $r['blocking'] ) { … … 727 735 return new WP_Error('http_request_failed', sprintf(__('Could not open handle for fopen() to %s'), $url)); 728 736 737 // WordPress supports PHP 4.3, which has this function. Removed sanity 738 // checking for performance reasons. 729 739 stream_set_timeout($handle, $r['timeout'] ); 730 740 -
trunk/wp-includes/update.php
r8630 r8644 146 146 $raw_response = wp_remote_request('http://api.wordpress.org/plugins/update-check/1.0/', $options); 147 147 148 if ( is_wp_error( $raw_response ) ) 149 return false; 150 148 151 if( 200 != $raw_response['response']['code'] ) { 149 152 return false;
Note: See TracChangeset
for help on using the changeset viewer.