Place into an else branch in the odd case where we are in safe_mode and passthru...
authorPlatonides <platonides@users.mediawiki.org>
Tue, 26 Oct 2010 14:31:13 +0000 (14:31 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Tue, 26 Oct 2010 14:31:13 +0000 (14:31 +0000)
includes/GlobalFunctions.php

index 0bdc558..d047922 100644 (file)
@@ -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 ) {