* @ingroup Media
*/
use MediaWiki\MediaWikiServices;
+use MediaWiki\Shell\Shell;
/**
* Handler for images that need to be transformed
}
// $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.
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 );