show meaningful error message for invalid width, resolves #74
[phpfspot.git] / phpfspot_img.php
index 5ef76b4ea97a9e95c3595ba4c6930846b8f5427c..bb7e93f15f0c5890f8bf8b0e0f57496b7bdcdabc 100644 (file)
@@ -87,6 +87,10 @@ class PHPFSPOT_IMG {
       /* show thumbnail */
       else {
 
+         if(!$this->parent->is_valid_width($width)) {
+            $this->parent->showTextImage("Requested width ". $width ."px is not valid!");
+            return;
+         }
          /* check for an entry if we already handled this photo before. If not,
             create a thumbnail for it.
          */