diff options
author | Simon Rettberg | 2022-05-17 14:19:53 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-05-17 14:19:53 +0200 |
commit | 091ed3b9c1832a0a7fc73415f450fac9e505f006 (patch) | |
tree | 0919c4aac056c35ed944af74ca923bb05c34bff5 /modules-available/statistics/pages | |
parent | [statistics] Client details: Display booted system and bootup duration (diff) | |
download | slx-admin-091ed3b9c1832a0a7fc73415f450fac9e505f006.tar.gz slx-admin-091ed3b9c1832a0a7fc73415f450fac9e505f006.tar.xz slx-admin-091ed3b9c1832a0a7fc73415f450fac9e505f006.zip |
[statistics] Add missing !== false check to query result
Diffstat (limited to 'modules-available/statistics/pages')
-rw-r--r-- | modules-available/statistics/pages/machine.inc.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules-available/statistics/pages/machine.inc.php b/modules-available/statistics/pages/machine.inc.php index 15e2e516..0b951396 100644 --- a/modules-available/statistics/pages/machine.inc.php +++ b/modules-available/statistics/pages/machine.inc.php @@ -256,9 +256,11 @@ class SubPage WHERE (dateline >= :lastboot) AND typeid = 'graphical-startup' AND machineuuid = :uuid ORDER BY dateline ASC LIMIT 1", ['lastboot' => $client['lastboot'], 'uuid' => $uuid]); - $boottime = $graphical['dateline'] - $client['lastboot']; - if ($boottime < 400) { // Sanity-check - $client['boottime_s'] = gmdate('i:s', $boottime); + if ($graphical !== false) { + $boottime = $graphical['dateline'] - $client['lastboot']; + if ($boottime < 400) { // Sanity-check + $client['boottime_s'] = gmdate('i:s', $boottime); + } } } // Get locations |