zhanglinxin il y a 1 an
Parent
commit
e47926e83c

+ 1 - 1
application/api/controller/Common.php

@@ -45,7 +45,6 @@ class Common extends Base
     public function initialize()
     {
         parent::initialize();
-        $this->pdf = new \TCPDF();
     }
 
     /**
@@ -80,6 +79,7 @@ class Common extends Base
         $filename = date('Ymd') . sha1(date('YmdHis', time()) . uniqid());
         $suffix = '.pdf';
         $realpath = substr($savePath, 1) . '/' . $filename . $suffix;
+        $this->pdf = new \TCPDF();
         self::exportPdf($_SERVER['DOCUMENT_ROOT'] . $realpath);
 //        self::tablePdf('测试文件',$_SERVER['DOCUMENT_ROOT'] . $realpath);
 

+ 1 - 1
application/approve/controller/Goods.php

@@ -176,7 +176,7 @@ class Goods extends Controller
             try {
                 if ($id > 0) {
                     self::create_stock($id, $data,$info,'update');
-                    $info->save($data);
+                    $info->force(true)->save($data);
                 } else {
                     $result = model::create($data);
                     $id = $result->id;

+ 1 - 2
thinkphp/library/think/model/concern/Attribute.php

@@ -289,8 +289,7 @@ trait Attribute
                     return 1;
                 }
 
-                // TODO != 改为 !==
-                return is_object($a) || $a !== $b ? 1 : 0;
+                return is_object($a) || $a != $b ? 1 : 0;
             });
         }