From: Ævar Arnfjörð Bjarmason Date: Sun, 8 May 2005 07:32:04 +0000 (+0000) Subject: * Adding wfSuppressWarnings() before the Exif validation, some of the type X-Git-Tag: 1.5.0alpha2~266 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=5cfa89d97b8bb2a9d41eaf9af7a7c71749799b84;p=lhc%2Fweb%2Fwiklou.git * Adding wfSuppressWarnings() before the Exif validation, some of the type checks in Exif::validate will spew warnings on invalid data. --- diff --git a/includes/Image.php b/includes/Image.php index d1835a9bab..581727285f 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -1140,11 +1140,14 @@ class Image $exif = exif_read_data( $this->imagePath ); $obj = new Exif; - $valid = $obj->mValidExif; + // Some of the type checks in validate will spew warnings on invalid data + wfSuppressWarnings(); foreach($exif as $k => $v) { - if ( !in_array($k, $valid) || !$obj->validate($k, $v) ) + if ( !in_array($k, $obj->mValidExif) || !$obj->validate($k, $v) ) unset($exif[$k]); } + wfRestoreWarnings(); + return $exif; }