From f9bf5f454318508c82f32e1b1bcd8ec7ba7fab5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=94=E5=A7=AC=E6=A1=91?= Date: Fri, 29 Jan 2021 14:26:27 -0500 Subject: [PATCH] =?UTF-8?q?Fix=20=E8=8A=82=E7=82=B9=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/NodeStatusDetection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/NodeStatusDetection.php b/app/Console/Commands/NodeStatusDetection.php index a98a7ba0..22644042 100644 --- a/app/Console/Commands/NodeStatusDetection.php +++ b/app/Console/Commands/NodeStatusDetection.php @@ -102,7 +102,7 @@ class NodeStatusDetection extends Command } // 节点检测次数 - if ($data[$node->id] && $detectionCheckTimes) { + if (isset($data[$node->id]) && $detectionCheckTimes) { // 已通知次数 $cacheKey = 'detection_check_times'.$node->id; if (Cache::has($cacheKey)) { @@ -122,7 +122,7 @@ class NodeStatusDetection extends Command } } - if ($data[$node->id]) { + if (isset($data[$node->id])) { $data[$node->id]['name'] = $node->name; }