* Added debug statements to retriveExifData()
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Mon, 9 May 2005 09:28:06 +0000 (09:28 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Mon, 9 May 2005 09:28:06 +0000 (09:28 +0000)
includes/Image.php

index ac4ec10..2352d6f 100644 (file)
@@ -1146,8 +1146,17 @@ class Image
                $exif = exif_read_data( $this->imagePath );
 
                foreach($exif as $k => $v) {
-                       if ( !in_array($k, $this->exif->mValidExif) || !$this->exif->validate($k, $v) )
+                       if ( !in_array($k, $this->exif->mValidExif) ) {
+                               wfDebug( "Image::retrieveExifData: '$k' was not a valid Exif tag (contents: '$v')\n");
                                unset($exif[$k]);
+                       }
+               }
+
+               foreach($exif as $k => $v) {
+                       if ( !$this->exif->validate($k, $v) ) {
+                               wfDebug( "Image::retrieveExifData: '$k' did not contain valid contents (contents: '$v')\n");
+                               unset($exif[$k]);
+                       }
                }
                return $exif;
        }