diff --git a/wp-includes/load.php b/wp-includes/load.php index 812569305a..ffbc1d2290 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -415,7 +415,7 @@ function timer_stop( $display = 0, $precision = 3 ) { * When `WP_DEBUG_LOG` is true, errors will be logged to `wp-content/debug.log`. * When `WP_DEBUG_LOG` is a valid path, errors will be logged to the specified file. * - * Errors are never displayed for XML-RPC, REST, and Ajax requests. + * Errors are never displayed for XML-RPC, REST, `ms-files.php`, and Ajax requests. * * @since 3.0.0 * @since 5.1.0 `WP_DEBUG_LOG` can be a file path. @@ -481,7 +481,10 @@ function wp_debug_mode() { error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR ); } - if ( defined( 'XMLRPC_REQUEST' ) || defined( 'REST_REQUEST' ) || ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) || wp_doing_ajax() || wp_is_json_request() ) { + if ( + defined( 'XMLRPC_REQUEST' ) || defined( 'REST_REQUEST' ) || defined( 'MS_FILES_REQUEST' ) || + ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) || + wp_doing_ajax() || wp_is_json_request() ) { ini_set( 'display_errors', 0 ); } } diff --git a/wp-includes/ms-files.php b/wp-includes/ms-files.php index 03af0843f7..6fb7e4d276 100644 --- a/wp-includes/ms-files.php +++ b/wp-includes/ms-files.php @@ -8,6 +8,7 @@ * @subpackage Multisite */ +define( 'MS_FILES_REQUEST', true ); define( 'SHORTINIT', true ); require_once dirname( __DIR__ ) . '/wp-load.php'; @@ -17,8 +18,6 @@ if ( ! is_multisite() ) { ms_file_constants(); -error_reporting( 0 ); - if ( '1' == $current_blog->archived || '1' == $current_blog->spam || '1' == $current_blog->deleted ) { status_header( 404 ); die( '404 — File not found.' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index c35920478c..32b23916c7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51356'; +$wp_version = '5.9-alpha-51358'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.