Merge pull request #3100 from murrant/issue-3090

Make sure port_assoc_mode is an int before inserting a device into the db
This commit is contained in:
Neil Lathwood
2016-02-26 16:51:35 +00:00
+5
View File
@@ -582,6 +582,11 @@ function createHost($host, $community = NULL, $snmpver, $port = 161, $transport
$poller_group=getpollergroup($poller_group);
/* Get port_assoc_mode id if neccessary
* We can work with names of IDs here */
if (! is_int ($port_assoc_mode))
$port_assoc_mode = get_port_assoc_mode_id ($port_assoc_mode);
$device = array('hostname' => $host,
'sysName' => $host,
'community' => $community,