From df09b7b2cc709694f97ba44836502d18649f801f Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 6 Feb 2006 05:14:58 +0000 Subject: [PATCH] make wfShellExec() work on windows a bit better --- includes/GlobalFunctions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index a300252836..7a46e5a301 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1764,6 +1764,10 @@ function wfShellExec( $cmd ) $cmd = escapeshellarg( $script ) . " $time $memKB $cmd"; } } + } elseif ( php_uname( 's' ) == 'Windows NT' ) { + # This is a hack to work around PHP's flawed invocation of cmd.exe + # http://news.php.net/php.internals/21796 + $cmd = '"' . $cmd . '"'; } return shell_exec( $cmd ); } -- 2.20.1