summaryrefslogtreecommitdiffstats
path: root/phpfspot.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r--phpfspot.class.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 579054d..7d58ffe 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -191,6 +191,12 @@ class PHPFSPOT {
}
$details = $this->get_photo_details($photo);
+
+ if(!$details) {
+ print "error";
+ return;
+ }
+
$orig_path = $this->translate_path($details['directory_path']) ."/". $details['name'];
$thumb_path = $this->cfg->base_path ."/thumbs/". $this->cfg->photo_width ."_". $this->getMD5($photo);
@@ -205,6 +211,7 @@ class PHPFSPOT {
/* If the thumbnail doesn't exist yet, try to create it */
if(!file_exists($thumb_path)) {
$this->gen_thumb($photo, true);
+ $thumb_path = $this->cfg->base_path ."/thumbs/". $this->cfg->photo_width ."_". $this->getMD5($photo);
}
$meta = $this->get_meta_informations($orig_path);
@@ -254,6 +261,7 @@ class PHPFSPOT {
}
else {
$this->_warning("Can't open file ". $thumb_path ."\n");
+ return;
}
if($previous_img) {