Make sure phpinfo() is not disabled before calling it in apache_mod_loaded().

props rohan013, harmr.
fixes #26772.
Built from https://develop.svn.wordpress.org/trunk@29330


git-svn-id: http://core.svn.wordpress.org/trunk@29110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-07-30 17:28:17 +00:00
parent 187e23b3d6
commit aca4a37c1d

View File

@ -3404,11 +3404,11 @@ function apache_mod_loaded($mod, $default = false) {
if ( !$is_apache )
return false;
if ( function_exists('apache_get_modules') ) {
if ( function_exists( 'apache_get_modules' ) ) {
$mods = apache_get_modules();
if ( in_array($mod, $mods) )
return true;
} elseif ( function_exists('phpinfo') ) {
} elseif ( function_exists( 'phpinfo' ) && false === strpos( ini_get( 'disable_functions' ), 'phpinfo' ) ) {
ob_start();
phpinfo(8);
$phpinfo = ob_get_clean();