浏览代码

Fix 节点检测报错

兔姬桑 4 年之前
父节点
当前提交
f9bf5f4543
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/Console/Commands/NodeStatusDetection.php

+ 2 - 2
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;
             }