From 4e86efbab442579e6d932dc5f039496464d5ace2 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 20 Dec 2023 18:13:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20app/api/controller/IndexCo?= =?UTF-8?q?ntroller.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复错误 --- app/api/controller/IndexController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/controller/IndexController.php b/app/api/controller/IndexController.php index afd5dd81..aa9a1073 100644 --- a/app/api/controller/IndexController.php +++ b/app/api/controller/IndexController.php @@ -70,8 +70,8 @@ class IndexController extends BaseApiController 'create_time' => $landCollection['create_time'] ]; $monitorThreshold = MonitorThreshold::select(); - if($monitorThreshold){ - $monitorThreshold=$monitorThreshold->toArray()[0]; + if($monitorThreshold->toArray()!=null){ + $monitorThreshold=$monitorThreshold[0]; }else{ $monitorThreshold=[]; }