diff --git a/wp-includes/functions.php b/wp-includes/functions.php index fe378341aa..3ec8523a90 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -5888,15 +5888,24 @@ function apache_mod_loaded( $mod, $default = false ) { return false; } + $loaded_mods = array(); + if ( function_exists( 'apache_get_modules' ) ) { - $mods = apache_get_modules(); - if ( in_array( $mod, $mods, true ) ) { + $loaded_mods = apache_get_modules(); + + if ( in_array( $mod, $loaded_mods, true ) ) { return true; } - } elseif ( function_exists( 'phpinfo' ) && false === strpos( ini_get( 'disable_functions' ), 'phpinfo' ) ) { - ob_start(); - phpinfo( 8 ); - $phpinfo = ob_get_clean(); + } + + if ( empty( $loaded_mods ) + && function_exists( 'phpinfo' ) + && false === strpos( ini_get( 'disable_functions' ), 'phpinfo' ) + ) { + ob_start(); + phpinfo( INFO_MODULES ); + $phpinfo = ob_get_clean(); + if ( false !== strpos( $phpinfo, $mod ) ) { return true; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 6adeed4841..d5d90c40cf 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-beta1-54298'; +$wp_version = '6.1-beta1-54299'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.