From f064061b1c3cc41ffcb187171f810e1364b4e3ee Mon Sep 17 00:00:00 2001 From: Mike Rostermund Date: Wed, 14 Oct 2015 20:33:59 +0200 Subject: [PATCH 1/2] Fixes issue where snmp_get would not return the value 0 --- includes/snmp.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/snmp.inc.php b/includes/snmp.inc.php index f472732cf5..935afff991 100644 --- a/includes/snmp.inc.php +++ b/includes/snmp.inc.php @@ -133,7 +133,7 @@ function snmp_get($device, $oid, $options=null, $mib=null, $mibdir=null) { if (is_string($data) && (preg_match('/(No Such Instance|No Such Object|No more variables left|Authentication failure)/i', $data))) { return false; } - else if ($data) { + elseif ($data || $data === '0') { return $data; } else { From 613050e1173887103269593e5bed03a60fe09373 Mon Sep 17 00:00:00 2001 From: Mike Rostermund Date: Wed, 14 Oct 2015 21:31:03 +0200 Subject: [PATCH 2/2] Remove old comment to kickstart scrut --- includes/snmp.inc.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/includes/snmp.inc.php b/includes/snmp.inc.php index 935afff991..f4603e5135 100644 --- a/includes/snmp.inc.php +++ b/includes/snmp.inc.php @@ -1,11 +1,5 @@