Ticket #11090: wp_debug_identical.patch
| File wp_debug_identical.patch, 4.9 KB (added by , 17 years ago) |
|---|
-
wp-includes/http.php
655 655 656 656 $proxy = new WP_HTTP_Proxy(); 657 657 658 if ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === WP_DEBUG ) ) {658 if ( defined('WP_DEBUG') && true === WP_DEBUG ) ) { 659 659 if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) 660 $handle = @fsockopen( $proxy->host(), $proxy->port(), $iError, $strError, $r['timeout'] );660 $handle = fsockopen( $proxy->host(), $proxy->port(), $iError, $strError, $r['timeout'] ); 661 661 else 662 $handle = @fsockopen( $fsockopen_host, $arrURL['port'], $iError, $strError, $r['timeout'] );662 $handle = fsockopen( $fsockopen_host, $arrURL['port'], $iError, $strError, $r['timeout'] ); 663 663 } else { 664 664 if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) 665 $handle = fsockopen( $proxy->host(), $proxy->port(), $iError, $strError, $r['timeout'] );665 $handle = @fsockopen( $proxy->host(), $proxy->port(), $iError, $strError, $r['timeout'] ); 666 666 else 667 $handle = fsockopen( $fsockopen_host, $arrURL['port'], $iError, $strError, $r['timeout'] );667 $handle = @fsockopen( $fsockopen_host, $arrURL['port'], $iError, $strError, $r['timeout'] ); 668 668 } 669 669 670 670 $endDelay = time(); … … 826 826 if ( 'http' != $arrURL['scheme'] && 'https' != $arrURL['scheme'] ) 827 827 $url = str_replace($arrURL['scheme'], 'http', $url); 828 828 829 if ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === WP_DEBUG ) ) 829 if ( defined('WP_DEBUG') && true === WP_DEBUG ) ) 830 $handle = fopen($url, 'r'); 831 else 830 832 $handle = @fopen($url, 'r'); 831 else832 $handle = fopen($url, 'r');833 833 834 834 if (! $handle) 835 835 return new WP_Error('http_request_failed', sprintf(__('Could not open handle for fopen() to %s'), $url)); … … 999 999 1000 1000 $context = stream_context_create($arrContext); 1001 1001 1002 if ( ! defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === WP_DEBUG ) ) 1002 if ( defined('WP_DEBUG') && true === WP_DEBUG ) ) 1003 $handle = fopen($url, 'r', false, $context); 1004 else 1003 1005 $handle = @fopen($url, 'r', false, $context); 1004 else1005 $handle = fopen($url, 'r', false, $context);1006 1006 1007 1007 if ( ! $handle) 1008 1008 return new WP_Error('http_request_failed', sprintf(__('Could not open handle for fopen() to %s'), $url)); … … 1167 1167 } 1168 1168 } 1169 1169 1170 if ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === WP_DEBUG ) ) //Emits warning level notices for max redirects and timeouts 1170 if ( defined('WP_DEBUG') && true === WP_DEBUG ) ) //Emits warning level notices for max redirects and timeouts 1171 $strResponse = http_request($r['method'], $url, $r['body'], $options, $info); //Emits warning level notices for max redirects and timeouts 1172 else 1171 1173 $strResponse = @http_request($r['method'], $url, $r['body'], $options, $info); 1172 else1173 $strResponse = http_request($r['method'], $url, $r['body'], $options, $info); //Emits warning level notices for max redirects and timeouts1174 1174 1175 1175 // Error may still be set, Response may return headers or partial document, and error 1176 1176 // contains a reason the request was aborted, eg, timeout expired or max-redirects reached. … … 1184 1184 $theHeaders = WP_Http::processHeaders($theHeaders); 1185 1185 1186 1186 if ( ! empty( $theBody ) && isset( $theHeaders['headers']['transfer-encoding'] ) && 'chunked' == $theHeaders['headers']['transfer-encoding'] ) { 1187 if ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === WP_DEBUG ) ) 1187 if ( defined('WP_DEBUG') && true === WP_DEBUG ) ) 1188 $theBody = http_chunked_decode($theBody); 1189 else 1188 1190 $theBody = @http_chunked_decode($theBody); 1189 else1190 $theBody = http_chunked_decode($theBody);1191 1191 } 1192 1192 1193 1193 if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($theHeaders['headers']) ) -
wp-includes/wp-db.php
357 357 function __construct($dbuser, $dbpassword, $dbname, $dbhost) { 358 358 register_shutdown_function(array(&$this, "__destruct")); 359 359 360 if ( defined('WP_DEBUG') and WP_DEBUG == true)360 if ( defined('WP_DEBUG') and true === WP_DEBUG ) 361 361 $this->show_errors(); 362 362 363 363 if ( defined('DB_CHARSET') ) -
wp-settings.php
199 199 timer_start(); 200 200 201 201 // Add define('WP_DEBUG',true); to wp-config.php to enable display of notices during development. 202 if ( defined('WP_DEBUG') && WP_DEBUG == true) {202 if ( defined('WP_DEBUG') && true === WP_DEBUG ) { 203 203 error_reporting(E_ALL); 204 204 // Add define('WP_DEBUG_DISPLAY', false); to wp-config.php to use the globally configured setting for display_errors and not force it to On 205 205 if ( ! defined('WP_DEBUG_DISPLAY') || WP_DEBUG_DISPLAY == true )