From 0dd183f1e1f25d0d59452bcd88d1d3edc0cbba57 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Wed, 26 Oct 2022 13:47:46 -0500 Subject: [PATCH] fix awplus ntp polling bug (#14521) tries to count an integer :/ --- includes/polling/ntp/awplus.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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');