From 133dd2e974b861e790031c8eadbcd44fcf2cfc97 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 29 Mar 2015 19:03:51 +0200 Subject: [PATCH] make sure place exists before printing hierarchy --- website/hierarchy.php | 7 +++++++ 1 file changed, 7 insertions(+) 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) {