From: Andrew Garrett Date: Mon, 10 Aug 2009 09:32:55 +0000 (+0000) Subject: Moar error handling for r53546 X-Git-Tag: 1.31.0-rc.0~40392 X-Git-Url: http://git.cyclocoop.org/%22.%24match%5B1%5D.%22?a=commitdiff_plain;h=f9ad4fedad8e21c1afde8e60a652fc6793fe165f;p=lhc%2Fweb%2Fwiklou.git Moar error handling for r53546 --- diff --git a/includes/media/GIF.php b/includes/media/GIF.php index ef06aa7873..fba54aefd2 100644 --- a/includes/media/GIF.php +++ b/includes/media/GIF.php @@ -24,8 +24,12 @@ class GIFHandler extends BitmapHandler { } function getImageArea( $image, $width, $height ) { - $metadata = unserialize($image->getMetadata()); - return $width * $height * $metadata['frameCount']; + if ($metadata) { + $metadata = unserialize($image->getMetadata()); + return $width * $height * $metadata['frameCount']; + } else { + return $width * $height; + } } function getMetadataType( $image ) {