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