From 56eec48db2aee2eb153531c95d02d9a68538bb47 Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Thu, 13 Oct 2016 22:21:02 +0100 Subject: [PATCH] fix: skip ip_exists function when we force add (#4738) --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index bb8bacddf3..ca7bdb724c 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -300,7 +300,7 @@ function addHost($host, $snmp_version = '', $port = '161', $transport = 'udp', $ } else { $ip = $host; } - if (ip_exists($ip)) { + if ($force_add !== true && ip_exists($ip)) { throw new HostIpExistsException("Already have host with this IP $host"); }