DataObjects/Images.php
authoredward <edward@roojs.com>
Wed, 6 Sep 2017 03:27:26 +0000 (11:27 +0800)
committeredward <edward@roojs.com>
Wed, 6 Sep 2017 03:27:26 +0000 (11:27 +0800)
DataObjects/Images.php

index 47d3ad6..19ab498 100644 (file)
@@ -771,10 +771,10 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
         $file = $this->getStoreName();
         
         if(!file_exists($file)){
-            return '';
+            return false;
         }
         
-        $type = pathinfo($path, PATHINFO_EXTENSION);
+        $type = pathinfo($file, PATHINFO_EXTENSION);
         $data = file_get_contents($path);
         $base64 = 'data:image/' . $type . ';base64,' . base64_encode($data);
     }