From 3c30666ea1f47be9f65e655655405f68320cff5a Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 25 May 2011 00:25:29 +0000 Subject: [PATCH] * Changed @ => wfSuppressWarnings * Added wfSuppressWarnings to Bitmap.php: Notice: unserialize(): Error at offset 0 of 2 bytes in D:\www\MW_trunk\phase3\includes\media\Bitmap.php on line 685 --- includes/media/Bitmap.php | 2 ++ includes/media/SVG.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index 9bb1470540..be4fb2d709 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -682,7 +682,9 @@ class BitmapHandler extends ImageHandler { if ( !$data ) { return 0; } + wfSuppressWarnings(); $data = unserialize( $data ); + wfRestoreWarnings(); if ( isset( $data['Orientation'] ) ) { # See http://sylvana.net/jpegcrop/exif_orientation.html switch ( $data['Orientation'] ) { diff --git a/includes/media/SVG.php b/includes/media/SVG.php index de0307df57..04cea7530c 100644 --- a/includes/media/SVG.php +++ b/includes/media/SVG.php @@ -216,7 +216,9 @@ class SvgHandler extends ImageHandler { } function unpackMetadata( $metadata ) { + wfSuppressWarnings(); $unser = @unserialize( $metadata ); + wfRestoreWarnings(); if ( isset( $unser['version'] ) && $unser['version'] == self::SVG_METADATA_VERSION ) { return $unser; } else { -- 2.20.1