]> git.mjollnir.org Git - s9y.git/commitdiff
bail out if thumbs are smaller than 1 px (0=off)
authorgarvinhicking <garvinhicking>
Mon, 11 Feb 2008 17:52:47 +0000 (17:52 +0000)
committergarvinhicking <garvinhicking>
Mon, 11 Feb 2008 17:52:47 +0000 (17:52 +0000)
include/functions_images.inc.php

index 8a8ba2b4d3779d94d72af1f4d3907d48aae35215..2841fb8f00c80a5631666fcbec47827b3fc20bd4 100644 (file)
@@ -609,6 +609,10 @@ function serendipity_makeThumbnail($file, $directory = '', $size = false, $thumb
     if ($size === false) {
         $size = $serendipity['thumbSize'];
     }
+    
+    if ($size < 1) {
+       return array(0,0);
+    }
 
     if ($thumbname === false) {
         $thumbname = $serendipity['thumbSuffix'];