X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fmedia%2FJpeg.php;h=040ff96e1c778d3569aeb38504469450a2553d7c;hb=b51076a84446d157bed511246450e70d26e0f945;hp=fbdbdfe31e8f9c232bc71f7760250787542d29e6;hpb=46343ca0dd56a8299f1a4078f45a7efe26de1213;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/Jpeg.php b/includes/media/Jpeg.php index fbdbdfe31e..040ff96e1c 100644 --- a/includes/media/Jpeg.php +++ b/includes/media/Jpeg.php @@ -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,16 +137,14 @@ 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'] ) . " " . wfEscapeShellArg( $params['srcPath'] ); wfDebug( __METHOD__ . ": running jpgtran: $cmd\n" ); - wfProfileIn( 'jpegtran' ); $retval = 0; $err = wfShellExecWithStderr( $cmd, $retval ); - wfProfileOut( 'jpegtran' ); if ( $retval !== 0 ) { $this->logErrorForExternalProcess( $retval, $err, $cmd );