shish 4 лет назад
Родитель
Сommit
978bfd225a
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      app-ghs/controllers/CustomController.php

+ 3 - 1
app-ghs/controllers/CustomController.php

@@ -269,7 +269,9 @@ class CustomController extends BaseController
         $custom->save();
         $ghsId = $custom->ghsId ?? 0;
         $ghs = GhsClass::getById($ghsId, true);
-        GhsClass::valid($ghs, $this->shopId);
+        if (empty($ghs)) {
+            util::fail('出错了');
+        }
         $ghs->giveLevel = $level;
         $ghs->save();
         util::complete('修改成功');