From 1609c402a42c812c77d070da251baf9c1ad587a7 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Wed, 28 Sep 2011 17:08:20 +0000 Subject: [PATCH] fix limits set to NULL git-svn-id: http://www.observium.org/svn/observer/trunk@2603 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/discovery/functions.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php index 1cfa3af2df..44c10cdb2a 100644 --- a/includes/discovery/functions.inc.php +++ b/includes/discovery/functions.inc.php @@ -149,7 +149,7 @@ function discover_sensor(&$valid, $class, $device, $oid, $index, $type, $descr, if ($high_limit != $sensor_entry['sensor_limit']) { - $update = array('sensor_limit' => ($high_limit == NULL ? NULL : $high_limit)); + $update = array('sensor_limit' => ($high_limit == NULL ? array('NULL') : $high_limit)); $updated = dbUpdate($update, 'sensors', '`sensor_id` = ?', array($sensor_entry['sensor_id'])); if ($debug) { echo("( $updated updated )\n"); } echo("H"); @@ -168,7 +168,7 @@ function discover_sensor(&$valid, $class, $device, $oid, $index, $type, $descr, if ($sensor_entry['sensor_limit_low'] != $low_limit) { - $update = array('sensor_limit_low' => ($low_limit == NULL ? NULL : $low_limit)); + $update = array('sensor_limit_low' => ($low_limit == NULL ? array('NULL') : $low_limit)); $updated = dbUpdate($update, 'sensors', '`sensor_id` = ?', array($sensor_entry['sensor_id'])); if ($debug) { echo("( $updated updated )\n"); } echo("L");