From: umherirrender Date: Fri, 26 Apr 2013 15:45:18 +0000 (+0200) Subject: Use wfShellExec in parserTest.inc X-Git-Tag: 1.31.0-rc.0~19850 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=a316459dd6b855e45d312bb5e45b43cbf4bc1c2b;p=lhc%2Fweb%2Fwiklou.git Use wfShellExec in parserTest.inc This avoids shell execution with backticks Change-Id: Ib0db0c2ac36ae615f280ed9db82d2ca6aad744b5 --- diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc index 7c8daf2e99..a0ede097a8 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -1174,9 +1174,10 @@ class ParserTest { global $wgDiff3; // we assume that people with diff3 also have usual diff - $diff = ( wfIsWindows() && !$wgDiff3 ) - ? `fc $shellInfile $shellOutfile` - : `diff -au $shellInfile $shellOutfile`; + $shellCommand = ( wfIsWindows() && !$wgDiff3 ) ? 'fc' : 'diff -au'; + + $diff = wfShellExec( "$shellCommand $shellInfile $shellOutfile" ); + unlink( $infile ); unlink( $outfile );