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:
parent
187e23b3d6
commit
aca4a37c1d
|
@ -3404,11 +3404,11 @@ function apache_mod_loaded($mod, $default = false) {
|
||||||
if ( !$is_apache )
|
if ( !$is_apache )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ( function_exists('apache_get_modules') ) {
|
if ( function_exists( 'apache_get_modules' ) ) {
|
||||||
$mods = apache_get_modules();
|
$mods = apache_get_modules();
|
||||||
if ( in_array($mod, $mods) )
|
if ( in_array($mod, $mods) )
|
||||||
return true;
|
return true;
|
||||||
} elseif ( function_exists('phpinfo') ) {
|
} elseif ( function_exists( 'phpinfo' ) && false === strpos( ini_get( 'disable_functions' ), 'phpinfo' ) ) {
|
||||||
ob_start();
|
ob_start();
|
||||||
phpinfo(8);
|
phpinfo(8);
|
||||||
$phpinfo = ob_get_clean();
|
$phpinfo = ob_get_clean();
|
||||||
|
|
Loading…
Reference in New Issue