Filenames with quotes fail here.
[lhc/web/wiklou.git] / maintenance / tests / phpunit / includes / api / RandomImageGenerator.php
index 05861f9..6bb9d00 100644 (file)
@@ -200,7 +200,7 @@ class RandomImageGenerator {
                        $drawCommand = "fill $fill  circle $originX,$originY $perimeterX,$perimeterY";
                        $args[] = '-draw ' . wfEscapeShellArg( $drawCommand );
                }
-               $args[] = $filename;
+               $args[] = wfEscapeShellArg( $filename );
 
                $command = wfEscapeShellArg( $wgImageMagickConvertCommand ) . " " . implode( " ", $args );
                $retval = null;