From: Bryan Tong Minh Date: Sat, 18 Dec 2010 15:00:11 +0000 (+0000) Subject: Follow-up r75476: Windows set command treats everything until the && as part of the... X-Git-Tag: 1.31.0-rc.0~33243 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=c71e58f76f538d900da54b920618fc90bf60ab94;p=lhc%2Fweb%2Fwiklou.git Follow-up r75476: Windows set command treats everything until the && as part of the environment variable, resulting in a trailing whitespace which breaks stuff. --- 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