Index: trunk/phase3/includes/media/Bitmap.php |
— | — | @@ -320,6 +320,16 @@ |
321 | 321 | if ( !$exif ) { |
322 | 322 | return false; |
323 | 323 | } |
| 324 | + if ( !isset( $exif['MEDIAWIKI_EXIF_VERSION'] ) || |
| 325 | + $exif['MEDIAWIKI_EXIF_VERSION'] != Exif::version() ) |
| 326 | + { |
| 327 | + // XXX: This should be caught by isMetadataValid(), but |
| 328 | + // some non-local repos might call this function without |
| 329 | + // checking validity, causing FormatExif to barf, so we |
| 330 | + // check it again just to be sure. |
| 331 | + wfDebug( __METHOD__.": wrong version\n" ); |
| 332 | + return false; |
| 333 | + } |
324 | 334 | unset( $exif['MEDIAWIKI_EXIF_VERSION'] ); |
325 | 335 | $format = new FormatExif( $exif ); |
326 | 336 | |