From: Brian Quinion Date: Fri, 2 Nov 2012 17:42:05 +0000 (+0000) Subject: fix some php warnings for cleaner output X-Git-Tag: v2.2.0~201 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/f87ea067ca6023a01d0d3c5b0fb5f9b47790228b?ds=inline fix some php warnings for cleaner output --- diff --git a/lib/template/search-json.php b/lib/template/search-json.php index dd75ad87..70e9e46b 100644 --- a/lib/template/search-json.php +++ b/lib/template/search-json.php @@ -39,7 +39,7 @@ $aPlace['class'] = $aPointDetails['class']; $aPlace['type'] = $aPointDetails['type']; - if ($aPointDetails['icon']) + if (isset($aPointDetails['icon']) && $aPointDetails['icon']) { $aPlace['icon'] = $aPointDetails['icon']; } diff --git a/lib/template/search-xml.php b/lib/template/search-xml.php index bdf1eab5..5ebfa282 100644 --- a/lib/template/search-xml.php +++ b/lib/template/search-xml.php @@ -61,7 +61,7 @@ echo " class='".htmlspecialchars($aResult['class'])."'"; echo " type='".htmlspecialchars($aResult['type'])."'"; - if ($aResult['icon']) + if (isset($aResult['icon']) && $aResult['icon']) { echo " icon='".htmlspecialchars($aResult['icon'], ENT_QUOTES)."'"; }