Upgrade/Install: Don't display PHP errors during installation.

If a user is installing WordPress for the first time and has set `WP_DEBUG` to true, a PHP error during installation makes for a visually jarring experience.

Fixes #37358


git-svn-id: https://develop.svn.wordpress.org/trunk@38423 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2016-08-28 17:49:05 +00:00
parent da865e68b7
commit 9033b02e43
1 changed files with 1 additions and 1 deletions

View File

@ -334,7 +334,7 @@ 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' ) || wp_doing_ajax() ) {
if ( defined( 'XMLRPC_REQUEST' ) || defined( 'REST_REQUEST' ) || ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) || wp_doing_ajax() ) {
@ini_set( 'display_errors', 0 );
}
}