Applied fix for snmp

This commit is contained in:
José González 2022-05-05 17:36:07 +02:00
parent c7b94c8538
commit f3272eb3df

View File

@ -3572,7 +3572,12 @@ class AgentWizard extends HTML
if ($full_output === true) {
$output[] = $key.' = '.$oid_unit;
} else {
preg_match('/\.\d+$/', $key, $index);
$index = [];
$index[] = preg_replace('/^'.$oid.'/', '', $key);
if (empty($index) === true) {
preg_match('/\.\d+$/', $key, $index);
}
$tmp = explode(': ', $oid_unit);
$output[$index[0]] = str_replace('"', '', ($tmp[1] ?? ''));
}