From da08d210bcbaae014bd86578bfeb004311b792b1 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 5 Dec 2005 06:35:08 +0000 Subject: [PATCH] Define $thumbUrl so it isn't undefined on failure --- includes/Linker.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index 4ffca4fe55..33d45da4be 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -474,23 +474,20 @@ class Linker { function makeThumbLinkObj( $img, $label = '', $alt, $align = 'right', $boxwidth = 180, $boxheight=false, $framed=false , $manual_thumb = "" ) { global $wgStylePath, $wgContLang; $url = $img->getViewURL(); + $thumbUrl = ''; $width = $height = 0; - if ( $img->exists() ) - { + if ( $img->exists() ) { $width = $img->getWidth(); $height = $img->getHeight(); } - if ( 0 == $width || 0 == $height ) - { + if ( 0 == $width || 0 == $height ) { $width = $height = 200; } - if ( $boxwidth == 0 ) - { + if ( $boxwidth == 0 ) { $boxwidth = 200; } - if ( $framed ) - { + if ( $framed ) { // Use image dimensions, don't scale $boxwidth = $width; $boxheight = $height; -- 2.20.1