diff --git a/app/common/model/Goods.php b/app/common/model/Goods.php index 640e8931..07a1dbf1 100644 --- a/app/common/model/Goods.php +++ b/app/common/model/Goods.php @@ -344,7 +344,7 @@ class Goods extends BaseModel } // 商品名称 - foreach ($params['keywords'] as $val){ + foreach ($params['keywords'] ?? [] as $val){ $filter[] = ['goods_name', 'like', "%{$val}%"]; } // 商品名称