Bootstrap/Load: Confirm the value of WP_ENVIRONMENT_TYPE before using.

This adjusts the check for the presence of the `WP_ENVIRONMENT_TYPE` constant to also confirm it is set to a non-empty value before using.

Props dd32, khokansardar, ramon-fincken.
Fixes #55741.

git-svn-id: https://develop.svn.wordpress.org/trunk@54239 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers
2022-09-20 02:22:49 +00:00
parent 2225a352e5
commit f2f99f3985
2 changed files with 2 additions and 2 deletions

View File

@@ -236,7 +236,7 @@ class WP_Debug_Data {
}
// Check WP_ENVIRONMENT_TYPE.
if ( defined( 'WP_ENVIRONMENT_TYPE' ) ) {
if ( defined( 'WP_ENVIRONMENT_TYPE' ) && WP_ENVIRONMENT_TYPE ) {
$wp_environment_type = WP_ENVIRONMENT_TYPE;
} else {
$wp_environment_type = __( 'Undefined' );