From 11b7e2842ba124fd162b3d0295e49217dfc4a1cc Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 12 Sep 2009 10:19:56 +0000 Subject: [PATCH] Use wfEscapeShellArg() so that the script works correctly when paths contain whitespaces --- maintenance/syntaxChecker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintenance/syntaxChecker.php b/maintenance/syntaxChecker.php index 387b92a684..90d1f878dc 100644 --- a/maintenance/syntaxChecker.php +++ b/maintenance/syntaxChecker.php @@ -125,7 +125,7 @@ class SyntaxChecker extends Maintenance { * @return boolean */ private function checkFileWithCli( $file ) { - $res = exec( 'php -l ' . $file ); + $res = exec( 'php -l ' . wfEscapeShellArg( $file ) ); if( strpos( $res, 'No syntax errors detected' ) === false ) { $this->mFailures[$file] = $res; $this->output( $res . "\n" ); -- 2.20.1