Changeset 8644 for trunk/wp-includes/http.php
- Timestamp:
- 08/13/2008 11:37:42 PM (17 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.