make image width an integer, not a real number
authorJens Frank <jeluf@users.mediawiki.org>
Sun, 9 May 2004 10:55:47 +0000 (10:55 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Sun, 9 May 2004 10:55:47 +0000 (10:55 +0000)
includes/Image.php

index de089e3..324b51d 100644 (file)
@@ -122,6 +122,9 @@ class Image
                global $wgImageMagickConvertCommand;
                global $wgUseImageMagick;
                global $wgUseSquid, $wgInternalServer;
+
+               $width = IntVal( $width );
+
                $thumbName = $this->thumbName( $width );
                $thumbPath = wfImageThumbDir( $thumbName )."/".$thumbName;
                $thumbUrl  = $this->thumbUrl( $width );
@@ -133,7 +136,6 @@ class Image
                }
                
                # Sanity check $width
-               $width = IntVal( $width );
                if( $width <= 0 ) {
                        # BZZZT
                        return "";