diff --git a/includes/polling/ntp/awplus.inc.php b/includes/polling/ntp/awplus.inc.php index f7d33c9b13..2497a832c6 100644 --- a/includes/polling/ntp/awplus.inc.php +++ b/includes/polling/ntp/awplus.inc.php @@ -20,13 +20,12 @@ $options = []; $options['filter']['type'] = ['=', $tmp_module]; $options['filter']['disabled'] = ['=', 0]; $options['filter']['ignore'] = ['=', 0]; -$components = $component->getComponents($device['device_id'], $options); // We only care about our device id. -$components = $components[$device['device_id']]; +$components = $component->getComponents($device['device_id'], $options)[$device['device_id']] ?? null; // Only collect SNMP data if we have enabled components -if (count($components > 0)) { +if ($components) { // Let's gather the stats.. $atNtpAssociationEntry = snmpwalk_group($device, 'atNtpAssociationEntry', 'AT-NTP-MIB');