From: Sarah Hoffmann Date: Sun, 29 Mar 2015 17:03:51 +0000 (+0200) Subject: make sure place exists before printing hierarchy X-Git-Tag: v2.4.0~6 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/133dd2e974b861e790031c8eadbcd44fcf2cfc97?ds=sidebyside make sure place exists before printing hierarchy --- diff --git a/website/hierarchy.php b/website/hierarchy.php index a900cde1..d99040a2 100755 --- a/website/hierarchy.php +++ b/website/hierarchy.php @@ -64,6 +64,13 @@ $oPlaceLookup->setPlaceId($iPlaceID); $aPlaceAddress = array_reverse($oPlaceLookup->getAddressDetails()); + + if (!sizeof($aPlaceAddress)) + { + echo "Unknown place id."; + exit; + } + $aBreadcrums = array(); foreach($aPlaceAddress as $i => $aPlace) {