From: Tim Starling Date: Mon, 6 Feb 2006 05:14:58 +0000 (+0000) Subject: make wfShellExec() work on windows a bit better X-Git-Tag: 1.6.0~369 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=df09b7b2cc709694f97ba44836502d18649f801f;p=lhc%2Fweb%2Fwiklou.git make wfShellExec() work on windows a bit better --- 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 ); }