Bug 3116: Division by zero on [[Image:Foo.png|123x123px|]]
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Tue, 16 Aug 2005 13:27:00 +0000 (13:27 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Tue, 16 Aug 2005 13:27:00 +0000 (13:27 +0000)
See Bug 3129

RELEASE-NOTES
includes/Linker.php
includes/SpecialExport.php

index 69057f4..8b04c37 100644 (file)
@@ -21,6 +21,8 @@ Misc work going on.....
 * (bug 2323) Remove "last" tabindex from history page
 * (bug 3141) Partial support for Breton language (thanks Fulup).
 * Partial support for Basque language (from wikipedia and meta)
+* (bug 3116) Division by zero on [[Image:Foo.png|123x123px|]]
+
 
 === Caveats ===
 
index d4e99d8..81c290c 100644 (file)
@@ -419,8 +419,9 @@ class Linker {
                        }
                        
                        return $prefix.$this->makeThumbLinkObj( $img, $label, $alt, $align, $width, $height, $framed, $manual_thumb ).$postfix;
+               }
 
-               } elseif ( $width ) {
+               if ( $width && $img->exists() ) {
 
                        # Create a resized image, without the additional thumbnail
                        # features
index 40fef6a..5fda2be 100644 (file)
@@ -236,7 +236,7 @@ class WikiExporter {
        function pageByName( $name ) {
                $title = Title::newFromText( $name );
                if( is_null( $title ) ) {
-                       return WikiError( "Can't export invalid title" );
+                       return new WikiError( "Can't export invalid title" );
                } else {
                        return $this->pageByTitle( $title );
                }