diff options
author | Simon Rettberg | 2022-11-15 17:19:49 +0100 |
---|---|---|
committer | Simon Rettberg | 2022-11-15 17:19:49 +0100 |
commit | efa65dbd0faac961512a87d1f99b4c3036c349bb (patch) | |
tree | 6b52feebd76fb95338ab1c726ef6661c47a61b9d /modules-available/statistics/inc | |
parent | [statistics] Add ID45 column to client list (diff) | |
download | slx-admin-efa65dbd0faac961512a87d1f99b4c3036c349bb.tar.gz slx-admin-efa65dbd0faac961512a87d1f99b4c3036c349bb.tar.xz slx-admin-efa65dbd0faac961512a87d1f99b4c3036c349bb.zip |
[statistics] Fix potential invalid array access
Diffstat (limited to 'modules-available/statistics/inc')
-rw-r--r-- | modules-available/statistics/inc/hardwareparser.inc.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules-available/statistics/inc/hardwareparser.inc.php b/modules-available/statistics/inc/hardwareparser.inc.php index bfb603ce..0840d3d3 100644 --- a/modules-available/statistics/inc/hardwareparser.inc.php +++ b/modules-available/statistics/inc/hardwareparser.inc.php @@ -328,7 +328,7 @@ class HardwareParser = self::convertSize($globalMainboardExtra['Memory Maximum Capacity'] . ' MB', 'G'); // BIOS section - need to combine this with mainboard or system model, as it doesn't have a meaningful // identifier on its own. So again like above, we add this to the mainboard data. - $bios = self::prepareDmiProperties(self::getDmiHandles($data, 0)[0]); + $bios = self::prepareDmiProperties(self::getDmiHandles($data, 0)[0] ?? []); foreach (['Version', 'Release Date', 'Firmware Revision'] as $k) { if (isset($bios[$k])) { // Prefix with "BIOS" to clarify, since it's added to the mainboard meta-data |