From: Brion Vibber Date: Mon, 5 Dec 2005 06:35:08 +0000 (+0000) Subject: Define $thumbUrl so it isn't undefined on failure X-Git-Tag: 1.6.0~1014 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=da08d210bcbaae014bd86578bfeb004311b792b1;p=lhc%2Fweb%2Fwiklou.git Define $thumbUrl so it isn't undefined on failure --- 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;