From: Andrew Garrett Date: Thu, 6 Aug 2009 22:55:44 +0000 (+0000) Subject: Error-handling for GIF getLongDesc X-Git-Tag: 1.31.0-rc.0~40453 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=1416c9c49dc10b81cc1fc49a321a4205636b0be7;p=lhc%2Fweb%2Fwiklou.git Error-handling for GIF getLongDesc --- diff --git a/includes/media/GIF.php b/includes/media/GIF.php index c25b5411b9..ef06aa7873 100644 --- a/includes/media/GIF.php +++ b/includes/media/GIF.php @@ -36,7 +36,9 @@ class GIFHandler extends BitmapHandler { global $wgUser, $wgLang; $sk = $wgUser->getSkin(); - $metadata = unserialize($image->getMetadata()); + $metadata = @unserialize($image->getMetadata()); + + if (!$metadata) return parent::getLongDesc( $image ); $info = array(); $info[] = $image->getMimeType();