* Changed @ => wfSuppressWarnings
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 25 May 2011 00:25:29 +0000 (00:25 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 25 May 2011 00:25:29 +0000 (00:25 +0000)
* 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
includes/media/SVG.php

index 9bb1470..be4fb2d 100644 (file)
@@ -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'] ) {
index de0307d..04cea75 100644 (file)
@@ -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 {