diff --git a/includes/discovery/sensors/temperatures/comware.inc.php b/includes/discovery/sensors/temperatures/comware.inc.php index 7ab10688da..8cf63755b9 100644 --- a/includes/discovery/sensors/temperatures/comware.inc.php +++ b/includes/discovery/sensors/temperatures/comware.inc.php @@ -15,9 +15,11 @@ if ($device['os'] == 'comware') { $entphydata = dbFetchRows("SELECT `entPhysicalIndex`, `entPhysicalClass`, `entPhysicalName` FROM `entPhysical` WHERE `device_id` = ? AND `entPhysicalClass` REGEXP 'module|sensor' ORDER BY `entPhysicalIndex`", array( $device['device_id'] )); - $tempdata = snmpwalk_cache_multi_oid($device, 'hh3cEntityExtTemperature', array(), 'HH3C-ENTITY-EXT-MIB'); if (!empty($entphydata)) { + + $tempdata = snmpwalk_cache_multi_oid($device, 'hh3cEntityExtTemperature', array(), 'HH3C-ENTITY-EXT-MIB'); + foreach ($entphydata as $index) { foreach ($tempdata as $tempindex => $value) { if ($index['entPhysicalIndex'] == $tempindex) {