]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 19 Jul 2021 07:43:04 +0000 (09:43 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 19 Jul 2021 07:43:04 +0000 (09:43 +0200)
1  2 
lib-php/website/search.php

index 56064e7a9efdbdb63e607316155d640852cb1834,b3a0fe83a32c5c89ca1e354abe4411d8260199d2..e553ef39a3a5616419169e89e5a9085d8c947252
@@@ -54,12 -54,7 +54,12 @@@ if (!$oGeocode->getQueryString(
  
  $hLog = logStart($oDB, 'search', $oGeocode->getQueryString(), $aLangPrefOrder);
  
 -$aSearchResults = $oGeocode->lookup();
 +// Ignore requests from a faulty app.
 +if ($oGeocode->getQueryString() === '-1,-1') {
 +  $aSearchResults = array();
 +} else {
 +  $aSearchResults = $oGeocode->lookup();
 +}
  
  logEnd($oDB, $hLog, count($aSearchResults));
  
@@@ -82,7 -77,9 +82,9 @@@ if (isset($_SERVER['REQUEST_SCHEME']
      $sMoreURL = '/search.php?'.http_build_query($aMoreParams);
  }
  
- if (CONST_Debug) exit;
+ if (CONST_Debug) {
+     exit;
+ }
  
  $sOutputTemplate = ($sOutputFormat == 'jsonv2') ? 'json' : $sOutputFormat;
  include(CONST_LibDir.'/template/search-'.$sOutputTemplate.'.php');