From: Ævar Arnfjörð Bjarmason Date: Mon, 20 Jun 2005 09:50:55 +0000 (+0000) Subject: * Using wfSupressWarnings() to avoid warnings on corrupt exif headers X-Git-Tag: 1.5.0beta1~133 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=6585731ced6bf116f5545088f1045cbcf07e740a;p=lhc%2Fweb%2Fwiklou.git * Using wfSupressWarnings() to avoid warnings on corrupt exif headers --- 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");