]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-php/Geocode.php
add type annotations to database check functions
[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'] = 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']
                 $aResult['importance'] *= $this->viewboxImportanceFactor(
                     $aResult['lon'],
                     $aResult['lat']