Merge "Avoid "$text must be a string" in Linker::formatLinksInComment"
[lhc/web/wiklou.git] / includes / media / Jpeg.php
index 810b9af..040ff96 100644 (file)
@@ -106,7 +106,7 @@ class JpegHandler extends ExifBitmapHandler {
                        $meta['MEDIAWIKI_EXIF_VERSION'] = Exif::version();
 
                        return serialize( $meta );
-               } catch ( MWException $e ) {
+               } catch ( Exception $e ) {
                        // BitmapMetadataHandler throws an exception in certain exceptional
                        // cases like if file does not exist.
                        wfDebug( __METHOD__ . ': ' . $e->getMessage() . "\n" );
@@ -137,7 +137,7 @@ class JpegHandler extends ExifBitmapHandler {
 
                $rotation = ( $params['rotation'] + $this->getRotation( $file ) ) % 360;
 
-               if ( $wgJpegTran && is_file( $wgJpegTran ) ) {
+               if ( $wgJpegTran && is_executable( $wgJpegTran ) ) {
                        $cmd = wfEscapeShellArg( $wgJpegTran ) .
                                " -rotate " . wfEscapeShellArg( $rotation ) .
                                " -outfile " . wfEscapeShellArg( $params['dstPath'] ) .