X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/f5e52e748f0a4275e3238e51c47de2ddccfea0ff..a2a44b875a02db284d0f67eb9a20506622da2257:/lib-php/Geocode.php diff --git a/lib-php/Geocode.php b/lib-php/Geocode.php index 9e3b0b92..0881d20a 100644 --- a/lib-php/Geocode.php +++ b/lib-php/Geocode.php @@ -103,7 +103,7 @@ class Geocode } $this->iFinalLimit = $iLimit; - $this->iLimit = $iLimit + min($iLimit, 10); + $this->iLimit = $iLimit + max($iLimit, 10); } public function setFeatureType($sFeatureType) @@ -874,7 +874,7 @@ class Geocode $iCountWords = 0; $sAddress = $aResult['langaddress']; foreach ($aRecheckWords as $i => $sWord) { - if (stripos($sAddress, $sWord)!==false) { + if (grapheme_stripos($sAddress, $sWord)!==false) { $iCountWords++; if (preg_match('/(^|,)\s*'.preg_quote($sWord, '/').'\s*(,|$)/', $sAddress)) { $iCountWords += 0.1;