From d17eb4faaadbc0f58eeddf03da948a276a717a7a Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Mon, 3 Sep 2018 01:55:34 -0500 Subject: [PATCH] Do not try to fetch data again if previous attempts failed (#9139) result is null, which will fail isset() check --- LibreNMS/Device/YamlDiscovery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LibreNMS/Device/YamlDiscovery.php b/LibreNMS/Device/YamlDiscovery.php index 9456d200f0..7e5a36e0e9 100644 --- a/LibreNMS/Device/YamlDiscovery.php +++ b/LibreNMS/Device/YamlDiscovery.php @@ -197,7 +197,7 @@ class YamlDiscovery foreach ($data_array as $data) { foreach ((array)$data['oid'] as $oid) { - if (!isset($pre_cache[$oid])) { + if (!array_key_exists($oid, $pre_cache)) { if (isset($data['snmp_flags'])) { $snmp_flag = $data['snmp_flags']; } else {