From: Jens Frank Date: Tue, 6 Dec 2005 22:33:47 +0000 (+0000) Subject: Avoid FATAL ERROR when creating thumbnail of non-existing image X-Git-Tag: 1.6.0~1002 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=41d064c9b2bb10c02232bfe1c2519f82fe46aa67;p=lhc%2Fweb%2Fwiklou.git Avoid FATAL ERROR when creating thumbnail of non-existing image --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2dac2a04be..0ad4ce6931 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -299,6 +299,7 @@ fully support the editing toolbar, but was found to be too confusing. get a blue link even if there's no local description page * (bug 4169) Use $wgLegalTitleChars in pipe trick conversions * (bug 4170) Decode HTML character escapes in sort key +* Avoid FATAL ERROR when creating thumbnail of non-existing image === Caveats === diff --git a/includes/Linker.php b/includes/Linker.php index 33d45da4be..f949637864 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -480,6 +480,8 @@ class Linker { if ( $img->exists() ) { $width = $img->getWidth(); $height = $img->getHeight(); + } else { + return $this->makeBrokenLinkObj( $img->getTitle() ); } if ( 0 == $width || 0 == $height ) { $width = $height = 200;