From 6585731ced6bf116f5545088f1045cbcf07e740a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Mon, 20 Jun 2005 09:50:55 +0000 Subject: [PATCH] * Using wfSupressWarnings() to avoid warnings on corrupt exif headers --- includes/Image.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/Image.php b/includes/Image.php index 2922312030..69f24de0f6 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -1400,7 +1400,10 @@ class Image function retrieveExifData () { if ( $this->getMimeType() !== "image/jpeg" ) return array (); + wfSuppressWarnings(); $exif = exif_read_data( $this->imagePath ); + wfRestoreWarnings(); + foreach($exif as $k => $v) { if ( !in_array($k, array_keys($this->exif->mFlatExif)) ) { wfDebug( "Image::retrieveExifData: '$k' is not a valid Exif tag (type: '" . gettype($v) . "'; data: '$v')\n"); -- 2.20.1