From 9033b02e4394c544933d853ad879bc63d9b1a56a Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sun, 28 Aug 2016 17:49:05 +0000 Subject: [PATCH] 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 --- src/wp-includes/load.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php index 82df7bb06e..98c6d42a94 100644 --- a/src/wp-includes/load.php +++ b/src/wp-includes/load.php @@ -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 ); } }