From ff14cd20a30978eb64a9ca375e30619de6546045 Mon Sep 17 00:00:00 2001 From: Platonides Date: Tue, 26 Oct 2010 14:31:13 +0000 Subject: [PATCH] Place into an else branch in the odd case where we are in safe_mode and passthru is additionally blocked. --- includes/GlobalFunctions.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 0bdc558314..d0479229e7 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2468,13 +2468,14 @@ function wfShellExec( $cmd, &$retval = null ) { if( wfIniGetBool( 'safe_mode' ) ) { wfDebug( "wfShellExec can't run in safe_mode, PHP's exec functions are too broken.\n" ); $disabled = 'safemode'; - } - $functions = explode( ',', ini_get( 'disable_functions' ) ); - $functions = array_map( 'trim', $functions ); - $functions = array_map( 'strtolower', $functions ); - if ( in_array( 'passthru', $functions ) ) { - wfDebug( "passthru is in disabled_functions\n" ); - $disabled = 'passthru'; + } else { + $functions = explode( ',', ini_get( 'disable_functions' ) ); + $functions = array_map( 'trim', $functions ); + $functions = array_map( 'strtolower', $functions ); + if ( in_array( 'passthru', $functions ) ) { + wfDebug( "passthru is in disabled_functions\n" ); + $disabled = 'passthru'; + } } } if ( $disabled ) { -- 2.20.1