mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fixes issue where snmp_get would not return the value 0
This commit is contained in:
@@ -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))) {
|
if (is_string($data) && (preg_match('/(No Such Instance|No Such Object|No more variables left|Authentication failure)/i', $data))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if ($data) {
|
elseif ($data || $data === '0') {
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user