missing source image detection
authorAlan <alan@roojs.com>
Wed, 30 Mar 2022 03:03:44 +0000 (11:03 +0800)
committerAlan <alan@roojs.com>
Wed, 30 Mar 2022 03:03:44 +0000 (11:03 +0800)
Images.php

index 039ec02..32859e1 100644 (file)
@@ -183,7 +183,7 @@ class Pman_Core_Images extends Pman
         
         $img = DB_DataObjecT::factory('Images');
          
-        if (!$id || !$img->get($id)) {
+        if (!$id || !$img->get($id) || !$img->exists()) {
             $this->imgErr("image has been removed or deleted.",$s);
         }