Ver Fonte

wes 多宝福袋

wesmiler há 2 anos atrás
pai
commit
df96c73976
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      app/admin/logic/ShopGoodsLogic.php

+ 1 - 1
app/admin/logic/ShopGoodsLogic.php

@@ -91,7 +91,7 @@ class ShopGoodsLogic
         $data['goods_img_banner'] = $banners?implode('|',$banners):'';
         $data['goods_remark'] = getContent(htmlspecialchars_decode($data['goods_remark']));
         $specRelation         = ShopGoodsSpecRelation::getArrListByGoodsId($id);
-        $specAttrId           = ShopGoodsSpecType::getPidById($specRelation[0]['spec_id']);
+        $specAttrId           = isset($specRelation[0])?ShopGoodsSpecType::getPidById($specRelation[0]['spec_id']):0;
         if ($data['is_exist_many_spec'] == 0) {
             $data['defaultSku'] = ShopGoodsSpec::getGoodsSpecByGoodId($id);
         }