Split down patch-actor-table.sql
[lhc/web/wiklou.git] / includes / media / TransformationalImageHandler.php
index 38dc390..95053cf 100644 (file)
@@ -26,6 +26,7 @@
  * @ingroup Media
  */
 use MediaWiki\MediaWikiServices;
+use MediaWiki\Shell\Shell;
 
 /**
  * Handler for images that need to be transformed
@@ -230,7 +231,7 @@ abstract class TransformationalImageHandler extends ImageHandler {
                }
 
                // $scaler will return a MediaTransformError on failure, or false on success.
-               // If the scaler is succesful, it will have created a thumbnail at the destination
+               // If the scaler is successful, it will have created a thumbnail at the destination
                // path.
                if ( is_array( $scaler ) && is_callable( $scaler ) ) {
                        // Allow subclasses to specify their own rendering methods.
@@ -517,7 +518,7 @@ abstract class TransformationalImageHandler extends ImageHandler {
                        function () use ( $method ) {
                                global $wgImageMagickConvertCommand;
 
-                               $cmd = wfEscapeShellArg( $wgImageMagickConvertCommand ) . ' -version';
+                               $cmd = Shell::escape( $wgImageMagickConvertCommand ) . ' -version';
                                wfDebug( $method . ": Running convert -version\n" );
                                $retval = '';
                                $return = wfShellExecWithStderr( $cmd, $retval );