wfDebug( __METHOD__ . ': ' . $e->getMessage() . "\n" );
/* This used to use 0 (ExifBitmapHandler::OLD_BROKEN_FILE) for the cases
- * * No metadata in the file
- * * Something is broken in the file.
+ * * No metadata in the file
+ * * Something is broken in the file.
* However, if the metadata support gets expanded then you can't tell if the 0 is from
* a broken file, or just no props found. A broken file is likely to stay broken, but
* a file which had no props could have props once the metadata support is improved.
* @param array $params Rotate parameters.
* 'rotation' clockwise rotation in degrees, allowed are multiples of 90
* @since 1.21
- * @return bool
+ * @return bool|MediaTransformError
*/
public function rotate( $file, $params ) {
global $wgJpegTran;
// we'll also add TinyRGB profile to images lacking a profile, but
// only if they're not low quality (which are meant to save bandwith
// and we don't want to increase the filesize by adding a profile)
- if ( $params['quality'] > 30 ) {
+ if ( isset( $params['quality'] ) && $params['quality'] > 30 ) {
$profiles[] = '-';
}