]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-php/Geocode.php
Merge pull request #2706 from mtmail/php-fixes-php7-vs-php8
[nominatim.git] / lib-php / Geocode.php
index bf9a32625c746ab63f22effd99575d6db91dc555..acb79493734c6ece129e341b74d035f89743ac57 100644 (file)
@@ -843,7 +843,9 @@ class Geocode
                 $aResult['importance'] = 0.001;
                 $aResult['foundorder'] = $aResult['addressimportance'];
             } else {
-                $aResult['importance'] = max(0.001, $aResult['importance']);
+                if ($aResult['importance'] == 0) {
+                    $aResult['importance'] = 0.0001;
+                }
                 $aResult['importance'] *= $this->viewboxImportanceFactor(
                     $aResult['lon'],
                     $aResult['lat']