From 95d3ef200230f6329dcdf806e48b39eeecdd5c52 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 27 Jun 2005 04:57:36 +0000 Subject: [PATCH] getThumbnail() may legitimately return null --- includes/Linker.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index fbecbd9f9d..7b4b6113ff 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -420,8 +420,10 @@ class Linker { } if ( '' == $manual_thumb ) { $thumb = $img->getThumbnail( $width ); - $height = $thumb->height; - $url = $thumb->getUrl( ); + if ( $thumb ) { + $height = $thumb->height; + $url = $thumb->getUrl( ); + } } } -- 2.20.1