Avoid FATAL ERROR when creating thumbnail of non-existing image
authorJens Frank <jeluf@users.mediawiki.org>
Tue, 6 Dec 2005 22:33:47 +0000 (22:33 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Tue, 6 Dec 2005 22:33:47 +0000 (22:33 +0000)
RELEASE-NOTES
includes/Linker.php

index 2dac2a0..0ad4ce6 100644 (file)
@@ -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 ===
index 33d45da..f949637 100644 (file)
@@ -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;