From 09da7fb96c45255899fa0f4c62412d14b8575b3e Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 5 Dec 2005 06:14:49 +0000 Subject: [PATCH] * (bug 4167) Fix regression caused by patch for bug 153 New code didn't check for null thumbnail (deleted or nonexistent images) --- RELEASE-NOTES | 1 + includes/Linker.php | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 843c5eb9be..671e7c7742 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -294,6 +294,7 @@ fully support the editing toolbar, but was found to be too confusing. * (bug 4165) Correct validation for user language selection (data taint) * Add createpage and createtalk permission keys, allowing a quick switch to disable page creation for anonymous users. +* (bug 4167) Fix regression caused by patch for bug 153 === Caveats === diff --git a/includes/Linker.php b/includes/Linker.php index d9cd2b6c70..4ffca4fe55 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -500,12 +500,11 @@ class Linker { $boxheight = -1; if ( '' == $manual_thumb ) { $thumb = $img->getThumbnail( $boxwidth, $boxheight ); - if ( is_null( $thumb ) ) { - return 'FATAL ERROR: Thumb object NULL in Linker.php:504'; + if ( $thumb ) { + $thumbUrl = $thumb->getUrl(); + $boxwidth = $thumb->width; + $boxheight = $thumb->height; } - $thumbUrl = $thumb->getUrl(); - $boxwidth = $thumb->width; - $boxheight = $thumb->height; } } $oboxwidth = $boxwidth + 2; -- 2.20.1