From: Chad Horohoe Date: Wed, 9 Jun 2010 10:15:19 +0000 (+0000) Subject: Don't use @, use wfSuppress/RestoreWarnings X-Git-Tag: 1.31.0-rc.0~36573 X-Git-Url: http://git.cyclocoop.org/%22.%24redirect_annul.%22?a=commitdiff_plain;h=88fd6d25aba7037e780fd88fd4f684f0f6501de2;p=lhc%2Fweb%2Fwiklou.git Don't use @, use wfSuppress/RestoreWarnings --- diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index d34f125ec2..5a64b32238 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -372,7 +372,9 @@ class BitmapHandler extends ImageHandler { # Special value indicating that there is no EXIF data in the file return true; } - $exif = @unserialize( $metadata ); + wfSuppressWarnings(); + $exif = unserialize( $metadata ); + wfRestoreWarnings(); if ( !isset( $exif['MEDIAWIKI_EXIF_VERSION'] ) || $exif['MEDIAWIKI_EXIF_VERSION'] != Exif::version() ) { diff --git a/includes/media/GIF.php b/includes/media/GIF.php index 434762fa1a..636ae6480d 100644 --- a/includes/media/GIF.php +++ b/includes/media/GIF.php @@ -54,15 +54,19 @@ class GIFHandler extends BitmapHandler { } function isMetadataValid( $image, $metadata ) { - $data = @unserialize( $metadata ); + wfSuppressWarnings(); + $data = unserialize( $metadata ); + wfRestoreWarnings(); return (boolean) $data; } function getLongDesc( $image ) { global $wgUser, $wgLang; $sk = $wgUser->getSkin(); - - $metadata = @unserialize($image->getMetadata()); + + wfSuppressWarnings(); + $metadata = unserialize($image->getMetadata()); + wfRestoreWarnings(); if (!$metadata) return parent::getLongDesc( $image );