Details
Description
While having in config.php:
$config['geocoding']['enable'] = FALSE;
|
New devices are not polled and results in "Device not yet polled" state even if graphs are working.
"UPDATE devices ..." query fails on syntax, because it is assembled into somethink like:
UPDATE `devices` set `uptime` ='36266894',`sysObjectID` ='.1.3.6.1.4.1.30803',`sysContact` ='*censored*',`sysName` ='*censored*',`sysDescr` ='*censored*',`location_lat` =,`location_lon` =,`location` ='PRAGUE',`version` ='*censored*',`features` ='*censored*',`last_polled` =NOW(),`last_polled_timetaken` ='1.6188',`device_state` ='*censored*' WHERE `device_id` = '6' |
In /includes/polling/system.inc.php location_lat and location_lon are set to array(NULL), forcing geocoding to resolve location, but when geocoding is disabled array(NULL) is wrongly compiled/escaped in SQL to "nothink" instead of "NULL".