follow-up r86195 - That $valid really was reachable :P
authorBrian Wolff <bawolff@users.mediawiki.org>
Sat, 16 Apr 2011 16:23:08 +0000 (16:23 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Sat, 16 Apr 2011 16:23:08 +0000 (16:23 +0000)
follow-up r86169 - It appears when merging PNGMetadataExtractor.php, I somehow deleted $duration (whoops!)

includes/media/JpegMetadataExtractor.php
includes/media/PNGMetadataExtractor.php

index fec7045..a556aa9 100644 (file)
@@ -150,6 +150,7 @@ class JpegMetadataExtractor {
 
                // the +12 is the length of an empty item.
                while ( $offset + 12 <= $appLen ) {
+                       $valid = true;
                        if ( substr( $app13, $offset, 4 ) !== '8BIM' ) {
                                // its supposed to be 8BIM
                                // but apparently sometimes isn't esp. in
index 314208e..a8a576a 100644 (file)
@@ -56,6 +56,7 @@ class PNGMetadataExtractor {
                $frameCount = 0;
                $loopCount = 1;
                $text = array();
+               $duration = 0.0;
                $bitDepth = 0;
                $colorType = 'unknown';
 
@@ -366,7 +367,6 @@ class PNGMetadataExtractor {
                        'loopCount' => $loopCount,
                        'duration' => $duration,
                        'text' => $text,
-                       'duration' => $duration,
                        'bitDepth' => $bitDepth,
                        'colorType' => $colorType,
                );