From f87ea067ca6023a01d0d3c5b0fb5f9b47790228b Mon Sep 17 00:00:00 2001 From: Brian Quinion Date: Fri, 2 Nov 2012 17:42:05 +0000 Subject: [PATCH] fix some php warnings for cleaner output --- lib/template/search-json.php | 2 +- lib/template/search-xml.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)."'"; } -- 2.39.5