Ticket #7456: 4779.r8544.diff
| File 4779.r8544.diff, 1.5 KB (added by , 18 years ago) |
|---|
-
http.php
542 542 543 543 $arrURL = parse_url($url); 544 544 545 if ( false === $arrURL ) 546 return new WP_Error('http_request_failed', sprintf(__('Malformed URL: %s'), $url)); 547 545 548 if ( 'http' != $arrURL['scheme'] || 'https' != $arrURL['scheme'] ) 546 549 $url = str_replace($arrURL['scheme'], 'http', $url); 547 550 548 $handle = fopen($url, 'r'); 551 if ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === WP_DEBUG ) ) 552 $handle = @fopen($url, 'r'); 553 else 554 $handle = fopen($url, 'r'); 549 555 550 556 if (! $handle) 551 557 return new WP_Error('http_request_failed', sprintf(__('Could not open handle for fopen() to %s'), $url)); … … 637 643 638 644 $arrURL = parse_url($url); 639 645 646 if ( false === $arrURL ) 647 return new WP_Error('http_request_failed', sprintf(__('Malformed URL: %s'), $url)); 648 640 649 if ( 'http' != $arrURL['scheme'] || 'https' != $arrURL['scheme'] ) 641 650 $url = str_replace($arrURL['scheme'], 'http', $url); 642 651 … … 656 665 657 666 $context = stream_context_create($arrContext); 658 667 659 $handle = fopen($url, 'r', false, $context); 668 if ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === WP_DEBUG ) ) 669 $handle = @fopen($url, 'r'); 670 else 671 $handle = fopen($url, 'r'); 660 672 661 673 if ( ! $handle) 662 674 return new WP_Error('http_request_failed', sprintf(__('Could not open handle for fopen() to %s'), $url)); … … 1107 1119 return $response['body']; 1108 1120 } 1109 1121 1110 ?> 1111 No newline at end of file 1122 ?>
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)