From: Platonides Date: Tue, 26 Oct 2010 14:31:13 +0000 (+0000) Subject: Place into an else branch in the odd case where we are in safe_mode and passthru... X-Git-Tag: 1.31.0-rc.0~34300 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/rappels.php?a=commitdiff_plain;h=ff14cd20a30978eb64a9ca375e30619de6546045;p=lhc%2Fweb%2Fwiklou.git Place into an else branch in the odd case where we are in safe_mode and passthru is additionally blocked. --- 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 ) {