mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Made scrutinizer recommended changes
This commit is contained in:
@@ -57,7 +57,7 @@ foreach ($oids as $index => $entry) {
|
||||
|
||||
$current = snmp_get($device, $oid, '-Oqv');
|
||||
|
||||
if ($type === 'dhcpatriotLicenseExpiration' && $current !== 'FULL:0' && gettype($epoch_time) === 'string') {
|
||||
if ($type === 'dhcpatriotLicenseExpiration' && $current !== 'FULL:0' && gettype($current) === 'string') {
|
||||
$epoch_time = explode(':', $current);
|
||||
$current = round((intval($epoch_time[1]) - $current_time) / (60 * 60 * 24));
|
||||
}
|
||||
|
@@ -20,10 +20,10 @@ $standard_dhcp_index = '2';
|
||||
$auth_dhcp_networks = snmpwalk_array_num($device, $dhcp_networks_base_oid . '.' . $auth_dhcp_index, 2);
|
||||
$standard_dhcp_networks = snmpwalk_array_num($device, $dhcp_networks_base_oid . '.' . $standard_dhcp_index, 2);
|
||||
|
||||
if (!is_array($standard_dhcp_networks) && !empty($auth_dhcp_networks)) {
|
||||
if (empty($standard_dhcp_networks) && !empty($auth_dhcp_networks)) {
|
||||
$dhcp_networks = $auth_dhcp_networks;
|
||||
}
|
||||
if (!is_array($auth_dhcp_networks) && !empty($standard_dhcp_networks)) {
|
||||
if (empty($auth_dhcp_networks) && !empty($standard_dhcp_networks)) {
|
||||
$dhcp_networks = $standard_dhcp_networks;
|
||||
}
|
||||
if (!empty($auth_dhcp_networks) && !empty($standard_dhcp_networks)) {
|
||||
|
Reference in New Issue
Block a user