stanley-king 7 éve
szülő
commit
44785ee9c0
2 módosított fájl, 6 hozzáadás és 1 törlés
  1. 4 1
      helper/fcode/mfcode.php
  2. 2 0
      mobile/control/fcode.php

+ 4 - 1
helper/fcode/mfcode.php

@@ -65,7 +65,10 @@ class mfcode
         $result = [];
         $result['fcode_id'] = $this->fc_id();
 
-        $result['goods_id'] = commonid_helper::instance()->one_goods($this->commonid());
+        $goods_id = commonid_helper::instance()->one_goods($this->commonid());
+        if($goods_id == false) return;
+
+        $result['goods_id'] = $goods_id;
         $result['fcode']    = $this->fcode();
         $result['key']      = $this->user_key();
         $result['usable_time'] = $this->usable_time();

+ 2 - 0
mobile/control/fcode.php

@@ -82,6 +82,8 @@ class fcodeControl extends mobileControl
     private function goods($common_id)
     {
         $goods_id = commonid_helper::instance()->one_goods($common_id);
+        if($goods_id == false) return [];
+
         $mod = Model('goods');
         $goods = $mod->find($goods_id);