From b758a87aeb83e791a9f6ad8eed9b1dac4d5db345 Mon Sep 17 00:00:00 2001 From: lq Date: Tue, 29 Apr 2025 09:58:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=AF=BC=E5=87=BAbug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/models/oldDb/DrugStoreDrug.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/models/oldDb/DrugStoreDrug.php b/common/models/oldDb/DrugStoreDrug.php index 4286877..8c4cf75 100644 --- a/common/models/oldDb/DrugStoreDrug.php +++ b/common/models/oldDb/DrugStoreDrug.php @@ -39,7 +39,7 @@ class DrugStoreDrug extends \common\modelsgii\oldDb\DrugStoreDrug $result = []; foreach ($list as $k => $v) { $result[$k]['drug_id'] = $v['drug_id']; - $result[$k]['drug_name'] = array_key_exists('drug_name', $v['drug'])? $v['drug']['drug_name']: '获取失败'; + $result[$k]['drug_name'] = array_key_exists('drug_name', $v['drug'] ?? [])? $v['drug']['drug_name']: '获取失败'; $result[$k]['market_price'] = $v['market_price']; $result[$k]['price'] = $v['price']; }