diff --git a/app/listener/SendGoodsCode.php b/app/listener/SendGoodsCode.php index 60938bbe..6be854c3 100644 --- a/app/listener/SendGoodsCode.php +++ b/app/listener/SendGoodsCode.php @@ -51,7 +51,7 @@ class SendGoodsCode $phone = ''; if (!empty($data) && is_string($data)) { $logisticsInfo = json_decode($data, true); - $phone = $logisticsInfo['data']['phone']; + $phone = $logisticsInfo['data']['phone'] ?? ''; Log::info("物流联系信息" . json_encode($logisticsInfo)); } return $phone;