From 5c5d879710886dfd322d383e0edc51fbe785a6c8 Mon Sep 17 00:00:00 2001 From: zyx Date: Thu, 17 Oct 2019 14:17:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=BA=90=E6=97=A5=E5=BF=97bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/TestResourceController.class.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Application/Home/Controller/TestResourceController.class.php b/Application/Home/Controller/TestResourceController.class.php index 3c9ca4306..293d40906 100644 --- a/Application/Home/Controller/TestResourceController.class.php +++ b/Application/Home/Controller/TestResourceController.class.php @@ -198,9 +198,14 @@ class TestResourceController extends BaseController $arrUserId = array_column($data,'id'); $logId = implode(',',$arrUserId); - $logRead = M('protect_log_read','tab_') - ->where("log_id IN({$logId}) and promote_id = {$promote_id}") - ->select(); + if ($logId) { + $logRead = M('protect_log_read','tab_') + ->where("log_id IN({$logId}) and promote_id = {$promote_id}") + ->select(); + } + else { + $logRead = []; + } $upsetData = array_column($logRead,'log_id');