summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/WebConsole/rest/server.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/admin/WebConsole/rest/server.php b/admin/WebConsole/rest/server.php
index 50ee5f67..c55d6709 100644
--- a/admin/WebConsole/rest/server.php
+++ b/admin/WebConsole/rest/server.php
@@ -167,12 +167,13 @@ EOD;
} else {
// Multiple responses.
foreach ($stat as $ip => $st) {
- $tmp = Array();
- $tmp['id'] = (int)$id[$ip];
- $tmp['ip'] = $ip;
- $tmp['status'] = $stat[$ip];
- empty($logged[$ip]) || $tmp['loggedin'] = $logged[$ip];
- array_push($response, $tmp);
+ if (isset($id[$ip])) {
+ $tmp = ['id' => (int)$id[$ip],
+ 'ip' => $ip,
+ 'status' => $stat[$ip]];
+ empty($logged[$ip]) || $tmp['loggedin'] = $logged[$ip];
+ array_push($response, $tmp);
+ }
}
}
jsonResponse(200, $response);