From f77d196f4da8c0f8464dfdcd26e40f9db49a865a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E5=98=89?= <445241500@qq.com> Date: Fri, 24 May 2024 23:18:38 +0800 Subject: [PATCH] 1 --- app/api/controller/Category.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/controller/Category.php b/app/api/controller/Category.php index bb17a958..40f1ca1e 100644 --- a/app/api/controller/Category.php +++ b/app/api/controller/Category.php @@ -51,7 +51,7 @@ class Category extends Controller $model = new CategoryModel; $hasGoods = GoodsCategoryRel::getcategory($this->storeId,$merchantId); $arr = []; - if (!empty($hasGoods)) { + if (isset($hasGoods['data']) && !empty($hasGoods['data'])) { foreach ($hasGoods['data'] as $v) { $arr[] = $v['category_id']; }