Fixed warning in DeviceList.php when missing disk

This commit is contained in:
bergware
2017-08-08 07:34:21 +02:00
parent 4935adaa65
commit 91ee554a31

View File

@@ -153,7 +153,8 @@ function array_offline(&$disk,$w) {
}
function array_online(&$disk) {
global $sum, $diskio;
$data = $diskio ? explode(' ',$diskio[$disk['device']]) : [];
$dev = $disk['device'];
$data = isset($diskio[$dev]) ? explode(' ',$diskio[$dev]) : [];
if (is_numeric($disk['temp'])) {
$sum['count']++;
$sum['temp'] += $disk['temp'];