From e2feb4535f98d67950256571d01b815de253374e Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq.com> Date: Tue, 10 Jun 2025 13:59:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/enterprise/controller/Posts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/enterprise/controller/Posts.php b/app/enterprise/controller/Posts.php index f893e49..06e9a93 100644 --- a/app/enterprise/controller/Posts.php +++ b/app/enterprise/controller/Posts.php @@ -114,7 +114,7 @@ class Posts extends BaseController $whereAnd = " ( p.status = 1 and p.delete_time = 0"; $whereOr = ''; - if ($friendUserId) { + if (!empty($friendUserId)) { // 验证是否为当前用户的好友 if (!is_numeric($friendUserId)) { return warning(lang('system.error')); @@ -178,7 +178,7 @@ class Posts extends BaseController ['status', '=', 1], ['delete_time', '=', 0] ]; - if ($friendUserId) { + if (!empty($friendUserId)) { // 验证是否为当前用户的好友 if (!is_numeric($friendUserId)) { return warning(lang('system.error'));