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

props rohan013, harmr.
fixes #26772.

git-svn-id: https://develop.svn.wordpress.org/trunk@29330 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-07-30 17:27:54 +00:00
parent 09877657d4
commit 6be5fc19b3

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();