DataObjects/Images.php wip_alan_T7187_new_design_for_email
authorAlan <alan@roojs.com>
Wed, 13 Apr 2022 09:31:53 +0000 (17:31 +0800)
committerAlan <alan@roojs.com>
Wed, 13 Apr 2022 09:31:53 +0000 (17:31 +0800)
DataObjects/Images.php

index c382d9e..f2c39c3 100644 (file)
@@ -536,9 +536,10 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
         //$size = min(1024, (int) $size);
         // the size should 200x150 to convert
         $sizear = preg_split('/(x|c)/', $size);
-        if(empty($sizear[1])){
-            $sizear[1] =   ''; // 0x with '0' is a box? why
+        if(!isset($sizear[1])){
+            $sizear[1] =   0; // 0x with '0' is a box? why
         }
+        
         $size = implode(strpos($size,'c') > -1 ? 'c' : 'x', $sizear);
 //        print_r($size);
         $fc = $this->toFileConvert();