shish 5 年 前
コミット
d25d64389a
1 ファイル変更1 行追加1 行削除
  1. 1 1
      biz-hd/merchant/classes/ShopClass.php

+ 1 - 1
biz-hd/merchant/classes/ShopClass.php

@@ -40,7 +40,7 @@ class ShopClass extends BaseClass
         if (!empty($exists)) {
         if (!empty($exists)) {
             util::fail('门店名称已经存在');
             util::fail('门店名称已经存在');
         }
         }
-        $data['img'] = json_encode($data['img']);
+        $data['img'] = isset($data['img']) ? json_encode($data['img']) : json_encode([]);
         $shop = self::add($data);
         $shop = self::add($data);
         return $shop;
         return $shop;
     }
     }