make get_random_tag_photo() behave correct when show_tags is set, fixes #81
[phpfspot.git] / phpfspot_img.php
index 5ef76b4ea97a9e95c3595ba4c6930846b8f5427c..b6952041dcedc69b0451baac8302aca8363eea62 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.
          */
@@ -159,7 +163,7 @@ class PHPFSPOT_IMG {
          $this->parent->gen_thumb($idx);
       }
 
-      $version = $this->parent­>get_latest_version($idx);
+      $version = $this->parent->get_latest_version($idx);
 
       $fullpath = $this->parent->get_thumb_path($width, $idx, $version);
       /* if the thumb file does not exist, create it */