From 3ba7789829e228196736993f1ead7c5cf97d879b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 7 Jul 2020 12:57:04 +0000 Subject: [PATCH] Bootstrap/Load: Set `WP_DEBUG` to true by default on `development` environments. Props johnbillion, kraftbj, Clorith, joostdevalk, dlh. Fixes #33161. Built from https://develop.svn.wordpress.org/trunk@48372 git-svn-id: http://core.svn.wordpress.org/trunk@48141 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/default-constants.php | 6 +++++- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-includes/default-constants.php b/wp-includes/default-constants.php index c7a37cbfbe..77f76319b8 100644 --- a/wp-includes/default-constants.php +++ b/wp-includes/default-constants.php @@ -74,7 +74,11 @@ function wp_initial_constants() { // Add define( 'WP_DEBUG', true ); to wp-config.php to enable display of notices during development. if ( ! defined( 'WP_DEBUG' ) ) { - define( 'WP_DEBUG', false ); + if ( 'development' === wp_get_environment_type() ) { + define( 'WP_DEBUG', true ); + } else { + define( 'WP_DEBUG', false ); + } } // Add define( 'WP_DEBUG_DISPLAY', null ); to wp-config.php to use the globally configured setting diff --git a/wp-includes/version.php b/wp-includes/version.php index 16a03f7c73..99dc3bbc97 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-48371'; +$wp_version = '5.5-alpha-48372'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.