]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/log.php
fix warning about missing HTTP_USER_AGENT
[nominatim.git] / lib / log.php
index 59e04d1745baf59f5e96232b59984187188f69df..c2103716ef91d684b5d665e9bf113ff581848088 100644 (file)
                                $sUserAgent = $_GET['email'];
                        elseif (isset($_SERVER['HTTP_REFERER']))
                                $sUserAgent = $_SERVER['HTTP_REFERER'];
-                       else
+                       elseif (isset($_SERVER['HTTP_USER_AGENT']))
                                $sUserAgent = $_SERVER['HTTP_USER_AGENT'];
+                       else
+                               $sUserAgent = '';
                        $sSQL = 'insert into new_query_log (type,starttime,query,ipaddress,useragent,language,format,searchterm)';
                        $sSQL .= ' values ('.getDBQuoted($sType).','.getDBQuoted($hLog[0]).','.getDBQuoted($hLog[2]);
                        $sSQL .= ','.getDBQuoted($hLog[1]).','.getDBQuoted($sUserAgent).','.getDBQuoted(join(',',$aLanguageList)).','.getDBQuoted($sOutputFormat).','.getDBQuoted($hLog[3]).')';