代码优化
This commit is contained in:
@@ -351,7 +351,7 @@ class MessageController extends BaseController
|
||||
// 检查消息是否已存在
|
||||
$exists = WechatMessageModel::where('id', $item['id']) ->find();
|
||||
|
||||
if ($exists['sendStatus'] == 0){
|
||||
if (!empty($exists) && $exists['sendStatus'] == 0){
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -472,7 +472,7 @@ class MessageController extends BaseController
|
||||
// 检查消息是否已存在
|
||||
$exists = WechatMessageModel::where('id', $item['id'])->find();
|
||||
|
||||
if ($exists['sendStatus'] == 0){
|
||||
if (!empty($exists) && $exists['sendStatus'] == 0){
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user