diff options
Diffstat (limited to 'modules-available/statistics/inc/hardwareparserlegacy.inc.php')
-rw-r--r-- | modules-available/statistics/inc/hardwareparserlegacy.inc.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules-available/statistics/inc/hardwareparserlegacy.inc.php b/modules-available/statistics/inc/hardwareparserlegacy.inc.php index 7ee39bce..a6ac6d5e 100644 --- a/modules-available/statistics/inc/hardwareparserlegacy.inc.php +++ b/modules-available/statistics/inc/hardwareparserlegacy.inc.php @@ -243,10 +243,11 @@ class HardwareParserLegacy $ramOk = true; } if ($ramOk && preg_match('/^\s*Number Of Devices:\s+(\d+)\s*$/i', $line, $out)) { - $row['Memory Slot Count'] += $out[1]; + $row['Memory Slot Count'] += (int)$out[1]; } if ($ramOk && preg_match('/^\s*Maximum Capacity:\s+(\d.+)/i', $line, $out)) { - $row['Memory Maximum Capacity'] += HardwareParser::convertSize($out[1], 'G', false); + /** @var array{"Memory Slot Count": int} $row */ + $row['Memory Maximum Capacity'] += (int)HardwareParser::convertSize($out[1], 'G', false); } } elseif ($section === 'Memory Device') { if (preg_match('/^\s*Size:\s*(.*?)\s*$/i', $line, $out)) { |