]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/Geocode.php
fix PHP warnings when reverse search was called without parameters
[nominatim.git] / lib / Geocode.php
index 7ea39e4954b4aa9e84a3da84060fdf02766c70b1..03df675278b5b21d43780a7e905355780c592e43 100644 (file)
@@ -908,6 +908,9 @@ class Geocode
         }
 
         $sQuery = $this->sQuery;
+        if (!preg_match('//u', $sQuery)) {
+            userError("Query string is not UTF-8 encoded.");
+        }
 
         // Conflicts between US state abreviations and various words for 'the' in different languages
         if (isset($this->aLangPrefOrder['name:en'])) {