summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/inc/hardwareparser.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2021-09-21 17:41:11 +0200
committerSimon Rettberg2021-09-21 17:41:11 +0200
commit8dc88f03f52a03f4b56bc6c14d87eb42e653cb55 (patch)
tree6a09f84c428f4fa8af0d27b25bb06d88bf4da591 /modules-available/statistics/inc/hardwareparser.inc.php
parentPassthrough WIP (diff)
downloadslx-admin-8dc88f03f52a03f4b56bc6c14d87eb42e653cb55.tar.gz
slx-admin-8dc88f03f52a03f4b56bc6c14d87eb42e653cb55.tar.xz
slx-admin-8dc88f03f52a03f4b56bc6c14d87eb42e653cb55.zip
[statistics/passthrough] Fixes
Diffstat (limited to 'modules-available/statistics/inc/hardwareparser.inc.php')
-rw-r--r--modules-available/statistics/inc/hardwareparser.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/statistics/inc/hardwareparser.inc.php b/modules-available/statistics/inc/hardwareparser.inc.php
index 87dcc4cf..562c5948 100644
--- a/modules-available/statistics/inc/hardwareparser.inc.php
+++ b/modules-available/statistics/inc/hardwareparser.inc.php
@@ -538,7 +538,7 @@ class HardwareParser
{
$ret = [];
foreach ($data as $key => $vals) {
- $val = trim($vals['values'][0]);
+ $val = trim($vals['values'][0] ?? 'NULL');
if ($val === '[Empty]' || $val === 'NULL')
continue;
$val = preg_replace('/[^a-z0-9]/', '', strtolower($val));
@@ -567,7 +567,7 @@ class HardwareParser
*/
private static function markDisconnected(string $uuid, string $dbType, array $excludedHwIds)
{
- error_log("Marking disconnected for $dbType from " . implode(', ', $excludedHwIds));
+ error_log("Marking disconnected for $dbType except " . implode(', ', $excludedHwIds));
if (empty($excludedHwIds)) {
Database::exec("UPDATE machine_x_hw mxh, statistic_hw h
SET mxh.disconnecttime = UNIX_TIMESTAMP()