]> git.openstreetmap.org Git - nominatim.git/commitdiff
make sure place exists before printing hierarchy
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 29 Mar 2015 17:03:51 +0000 (19:03 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 29 Mar 2015 17:03:51 +0000 (19:03 +0200)
website/hierarchy.php

index a900cde1b2d7747c22f0cf9c3759e60553cf903b..d99040a2f2d31596002aafeb020cb599b29cdf91 100755 (executable)
        $oPlaceLookup->setPlaceId($iPlaceID);
 
        $aPlaceAddress = array_reverse($oPlaceLookup->getAddressDetails());
        $oPlaceLookup->setPlaceId($iPlaceID);
 
        $aPlaceAddress = array_reverse($oPlaceLookup->getAddressDetails());
+
+       if (!sizeof($aPlaceAddress))
+       {
+               echo "Unknown place id.";
+               exit;
+       }
+
        $aBreadcrums = array();
        foreach($aPlaceAddress as $i => $aPlace)
        {
        $aBreadcrums = array();
        foreach($aPlaceAddress as $i => $aPlace)
        {