Index: trunk/phase3/includes/media/Bitmap.php |
— | — | @@ -372,7 +372,9 @@ |
373 | 373 | # Special value indicating that there is no EXIF data in the file |
374 | 374 | return true; |
375 | 375 | } |
376 | | - $exif = @unserialize( $metadata ); |
| 376 | + wfSuppressWarnings(); |
| 377 | + $exif = unserialize( $metadata ); |
| 378 | + wfRestoreWarnings(); |
377 | 379 | if ( !isset( $exif['MEDIAWIKI_EXIF_VERSION'] ) || |
378 | 380 | $exif['MEDIAWIKI_EXIF_VERSION'] != Exif::version() ) |
379 | 381 | { |
Index: trunk/phase3/includes/media/GIF.php |
— | — | @@ -54,16 +54,20 @@ |
55 | 55 | } |
56 | 56 | |
57 | 57 | function isMetadataValid( $image, $metadata ) { |
58 | | - $data = @unserialize( $metadata ); |
| 58 | + wfSuppressWarnings(); |
| 59 | + $data = unserialize( $metadata ); |
| 60 | + wfRestoreWarnings(); |
59 | 61 | return (boolean) $data; |
60 | 62 | } |
61 | 63 | |
62 | 64 | function getLongDesc( $image ) { |
63 | 65 | global $wgUser, $wgLang; |
64 | 66 | $sk = $wgUser->getSkin(); |
| 67 | + |
| 68 | + wfSuppressWarnings(); |
| 69 | + $metadata = unserialize($image->getMetadata()); |
| 70 | + wfRestoreWarnings(); |
65 | 71 | |
66 | | - $metadata = @unserialize($image->getMetadata()); |
67 | | - |
68 | 72 | if (!$metadata) return parent::getLongDesc( $image ); |
69 | 73 | |
70 | 74 | $info = array(); |