diff options
author | Simon Rettberg | 2021-11-03 16:01:00 +0100 |
---|---|---|
committer | Simon Rettberg | 2021-11-03 16:01:00 +0100 |
commit | 7704e4c8e32bb8104719a6a53586f6148e0ab448 (patch) | |
tree | c1277321a2d46b6cdf1dc00ad0e1c5bea7985820 | |
parent | Merge branch 'master' into hardware-stats (diff) | |
download | slx-admin-7704e4c8e32bb8104719a6a53586f6148e0ab448.tar.gz slx-admin-7704e4c8e32bb8104719a6a53586f6148e0ab448.tar.xz slx-admin-7704e4c8e32bb8104719a6a53586f6148e0ab448.zip |
[statistics] Fix: Don't crash on missing memory data
-rw-r--r-- | modules-available/statistics/pages/machine.inc.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules-available/statistics/pages/machine.inc.php b/modules-available/statistics/pages/machine.inc.php index 62abc8d2..b23db721 100644 --- a/modules-available/statistics/pages/machine.inc.php +++ b/modules-available/statistics/pages/machine.inc.php @@ -438,7 +438,10 @@ class SubPage $q = new HardwareQuery(HardwareInfo::MAINBOARD, $uuid); $q->addGlobalColumn('Memory Maximum Capacity'); $q->addGlobalColumn('Memory Slot Count'); - $return += $q->query()->fetch(); + $res = $q->query()->fetch(); + if (is_array($res)) { + $return += $res; + } return $return; } |