diff --git a/html/pages/addhost.inc.php b/html/pages/addhost.inc.php index f5a84f420b..828ab19f8c 100644 --- a/html/pages/addhost.inc.php +++ b/html/pages/addhost.inc.php @@ -24,7 +24,7 @@ if ($_POST['hostname']) $snmpver = mres($_POST['snmpver']); if ($_POST['port']) { $port = mres($_POST['port']); } else { $port = $config['snmp']['port']; } - $transport = mres($_POST['transport']); + if ($_POST['transport']) { $transport = mres($_POST['transport']); } else { $transport = "udp"; } print_message("Adding host $hostname communit" . (count($config['snmp']['community']) == 1 ? "y" : "ies") . " " . implode(', ',$config['snmp']['community']) . " port $port using $transport"); } elseif ($_POST['snmpver'] === "v3")