]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/lib.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib / lib.php
index 12f7e57e6eddb2217bceb51bd66a9102fdfe5dd8..b54023a4becbc1bde9ee7322130c26381024204b 100644 (file)
@@ -45,7 +45,7 @@
                if (!$sUserError) $sUserError = $sError;
                error_log('ERROR: '.$sError);
                echo $sUserError."\n";
-               exit;
+               exit(-1);
        }
 
 
                        {
                                $sTypeLabel = strtolower(isset($aTypeLabel['simplelabel'])?$aTypeLabel['simplelabel']:$aTypeLabel['label']);
                                $sTypeLabel = str_replace(' ','_',$sTypeLabel);
-                               if (!isset($aAddress[$sTypeLabel]) || (isset($aFallback[$sTypeLabel]) && $aFallback[$sTypeLabel]))
+                               if (!isset($aAddress[$sTypeLabel]) || (isset($aFallback[$sTypeLabel]) && $aFallback[$sTypeLabel]) || $aLine['class'] == 'place')
                                {
                                        $aAddress[$sTypeLabel] = $aLine['localname']?$aLine['localname']:$aLine['housenumber'];
                                }