From: Jens Frank Date: Mon, 13 Jun 2005 06:38:02 +0000 (+0000) Subject: BUG#2292 - catch 'null' return values for getThumbnail() X-Git-Tag: 1.5.0beta1~193 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=04f3b6154a38089f96373b772473f2819a45a1b9;p=lhc%2Fweb%2Fwiklou.git BUG#2292 - catch 'null' return values for getThumbnail() --- diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 6e8276ec62..b1a03a77e9 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -158,7 +158,11 @@ class ImagePage extends Article { && ( $width != $this->img->getWidth() || $height != $this->img->getHeight() ) ) { if( $wgUseImageResize ) { $thumbnail = $this->img->getThumbnail( $width ); - $url = $thumbnail->getUrl(); + if ( $thumbnail == null ) { + $url = $full_url; + } else { + $url = $thumbnail->getUrl(); + } } else { # No resize ability? Show the full image, but scale # it down in the browser so it fits on the page.