From f9a7441b4e546cfd23b21802ab2ecae240bf7cb1 Mon Sep 17 00:00:00 2001 From: bohdan-s Date: Mon, 23 Jun 2014 19:29:53 -0400 Subject: [PATCH] Fix $transport not defined bug --- html/pages/addhost.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")