From aca4a37c1d51ac89e5f69d8755b54cbeee48ad4d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 30 Jul 2014 17:28:17 +0000 Subject: [PATCH] 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 --- wp-includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 17016fcaff..6ee29a84e9 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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();