#13520 fixed message error when create snmp policy

This commit is contained in:
Daniel Cebrian 2024-04-29 15:45:57 +02:00
parent ed5ddc1799
commit b60b96239f
1 changed files with 6 additions and 1 deletions

View File

@ -1588,10 +1588,15 @@ function snmp_browser_create_modules_snmp(
enterprise_include_once('include/functions_policies.php');
foreach ($id_target as $policy) {
$exist = db_get_row_filter('tpolicy_modules', ['name' => $oid['oid'], 'id_policy' => $policy], '*');
if ($exist !== false) {
$ids[] = false;
} else {
$ids[] = policies_create_module($oid['oid'], $policy, 2, $values);
}
}
}
}
if (isset($ids) === true && is_array($ids) === true) {
foreach ($ids as $id) {