r88768 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88767‎ | r88768 | r88769 >
Date:00:25, 25 May 2011
Author:aaron
Status:resolved (Comments)
Tags:
Comment:
* 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
Modified paths:
  • /trunk/phase3/includes/media/Bitmap.php (modified) (history)
  • /trunk/phase3/includes/media/SVG.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/media/SVG.php
@@ -216,7 +216,9 @@
217217 }
218218
219219 function unpackMetadata( $metadata ) {
 220+ wfSuppressWarnings();
220221 $unser = @unserialize( $metadata );
 222+ wfRestoreWarnings();
221223 if ( isset( $unser['version'] ) && $unser['version'] == self::SVG_METADATA_VERSION ) {
222224 return $unser;
223225 } else {
Index: trunk/phase3/includes/media/Bitmap.php
@@ -682,7 +682,9 @@
683683 if ( !$data ) {
684684 return 0;
685685 }
 686+ wfSuppressWarnings();
686687 $data = unserialize( $data );
 688+ wfRestoreWarnings();
687689 if ( isset( $data['Orientation'] ) ) {
688690 # See http://sylvana.net/jpegcrop/exif_orientation.html
689691 switch ( $data['Orientation'] ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r88775Finish r88768, *ahem*aaron05:26, 25 May 2011

Comments

#Comment by Nikerabbit (talk | contribs)   05:24, 25 May 2011

Forgot to actually remove the @?

Status & tagging log