Răsfoiți Sursa

Fix 节点检测报错

兔姬桑 4 ani în urmă
părinte
comite
f9bf5f4543
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  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;
             }