From f9ad4fedad8e21c1afde8e60a652fc6793fe165f Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Mon, 10 Aug 2009 09:32:55 +0000 Subject: [PATCH] Moar error handling for r53546 --- includes/media/GIF.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 ) { -- 2.20.1