From e47646ddbaf7b2e7dc93b41394d0a3d10d58f16e Mon Sep 17 00:00:00 2001 From: marc tobias Date: Tue, 21 Aug 2018 17:26:14 +0200 Subject: [PATCH] in /details JSON output add check if place (type) has an icon set --- lib/template/details-json.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/template/details-json.php b/lib/template/details-json.php index 9b4237c7..06554aba 100644 --- a/lib/template/details-json.php +++ b/lib/template/details-json.php @@ -26,7 +26,9 @@ $aPlaceDetails['calculated_importance'] = (float) $aPointDetails['calculated_imp $aPlaceDetails['extratags'] = $aPointDetails['aExtraTags']; $aPlaceDetails['calculated_wikipedia'] = $aPointDetails['wikipedia']; -$aPlaceDetails['icon'] = CONST_Website_BaseURL.'images/mapicons/'.$aPointDetails['icon'].'.n.32.png'; +if ($aPointDetails['icon']) { + $aPlaceDetails['icon'] = CONST_Website_BaseURL.'images/mapicons/'.$aPointDetails['icon'].'.n.32.png'; +} $aPlaceDetails['rank_address'] = (int) $aPointDetails['rank_address']; $aPlaceDetails['rank_search'] = (int) $aPointDetails['rank_search']; -- 2.39.5