From c71e58f76f538d900da54b920618fc90bf60ab94 Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Sat, 18 Dec 2010 15:00:11 +0000 Subject: [PATCH] Follow-up r75476: Windows set command treats everything until the && as part of the environment variable, resulting in a trailing whitespace which breaks stuff. --- includes/GlobalFunctions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 2e8986e69d..1dd24ae95e 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2511,7 +2511,7 @@ function wfShellExec( $cmd, &$retval = null, $environ = array() ) { * Note however that the quote isn't listed there, but is needed, and the parentheses * are listed there but doesn't appear to need it. */ - $envcmd .= "set $k=" . preg_replace( '/([&|()<>^"])/', '^\\1', $v ) . ' && '; + $envcmd .= "set $k=" . preg_replace( '/([&|()<>^"])/', '^\\1', $v ) . '&& '; } else { /* Assume this is a POSIX shell, thus required to accept variable assignments before the command * http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_09_01 -- 2.20.1