r54703 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54702‎ | r54703 | r54704 >
Date:09:32, 10 August 2009
Author:werdna
Status:resolved (Comments)
Tags:
Comment:
Moar error handling for r53546
Modified paths:
  • /trunk/phase3/includes/media/GIF.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/media/GIF.php
@@ -24,8 +24,12 @@
2525 }
2626
2727 function getImageArea( $image, $width, $height ) {
28 - $metadata = unserialize($image->getMetadata());
29 - return $width * $height * $metadata['frameCount'];
 28+ if ($metadata) {
 29+ $metadata = unserialize($image->getMetadata());
 30+ return $width * $height * $metadata['frameCount'];
 31+ } else {
 32+ return $width * $height;
 33+ }
3034 }
3135
3236 function getMetadataType( $image ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r54708Fix silly bug in r54703 r53546werdna11:04, 10 August 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r53546followup to r53545: mostrevisors-users made mandatory.purodha11:35, 20 July 2009

Comments

#Comment by Raymond (talk | contribs)   10:59, 10 August 2009

[10-Aug-2009 10:49:22] PHP Notice: Undefined variable: metadata in /var/www/w/includes/media/GIF.php on line 27

#Comment by Werdna (talk | contribs)   11:05, 10 August 2009

testing fail r54708

Status & tagging log