From 22cc337093d7fae4374839183eedbd76dddb065e Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Tue, 16 Dec 2008 15:50:04 +0100 Subject: [PATCH] Fix invalid query. Signed-off-by: Florent Bruneau --- include/geoloc.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/geoloc.inc.php b/include/geoloc.inc.php index 8511a4e..28ffe51 100644 --- a/include/geoloc.inc.php +++ b/include/geoloc.inc.php @@ -326,8 +326,10 @@ function fix_cities_not_on_map($limit=false, $cityid=false) $values .= ",($cityid, $map_id, '')"; } } - XDB::execute("REPLACE INTO geoloc_city_in_maps - VALUES ".substr($values, 1)); + if (strlen($values) > 1) { + XDB::execute("REPLACE INTO geoloc_city_in_maps + VALUES ".substr($values, 1)); + } } else { return false; } -- 2.1.4