From d53619ab4fd9bde4ac227c934ccec3cd67b0e04f Mon Sep 17 00:00:00 2001 From: Maximilian Wilhelm Date: Tue, 14 Jun 2016 13:12:54 +0200 Subject: [PATCH] Fix database update queries in discovery.php. Signed-off-by: Maximilian Wilhelm --- includes/discovery/ports.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/discovery/ports.inc.php b/includes/discovery/ports.inc.php index fd31fa9ce4..4439934c0e 100644 --- a/includes/discovery/ports.inc.php +++ b/includes/discovery/ports.inc.php @@ -62,7 +62,7 @@ foreach ($port_stats as $ifIndex => $port) { // Port re-discovered after previous deletion? else if ($ports_db[$port_id]['deleted'] == '1') { - dbUpdate(array('deleted' => '0'), 'ports', '`port_id` = ?', array($ports_db[$port_id])); + dbUpdate(array('deleted' => '0'), 'ports', '`port_id` = ?', array($port_id)); $ports_db[$port_id]['deleted'] = '0'; echo 'U'; } @@ -78,7 +78,7 @@ foreach ($port_stats as $ifIndex => $port) { else { if (is_array($ports_db[$port_id])) { if ($ports_db[$port_id]['deleted'] != '1') { - dbUpdate(array('deleted' => '1'), 'ports', '`port_id` = ?', array($ports_db[$port_id])); + dbUpdate(array('deleted' => '1'), 'ports', '`port_id` = ?', array($port_id)); $ports_db[$port_id]['deleted'] = '1'; echo '-'; }