]> git.openstreetmap.org Git - nominatim.git/commitdiff
fix some php warnings for cleaner output
authorBrian Quinion <openstreetmap@brian.quinion.co.uk>
Fri, 2 Nov 2012 17:42:05 +0000 (17:42 +0000)
committerBrian Quinion <openstreetmap@brian.quinion.co.uk>
Fri, 2 Nov 2012 17:42:05 +0000 (17:42 +0000)
lib/template/search-json.php
lib/template/search-xml.php

index dd75ad871af0abfdd34c7db7e7339add0f9d2e51..70e9e46bf9cc3dff34c9046aa16ed6d396d32b90 100644 (file)
@@ -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'];
                }
index bdf1eab53ae93b19a8f04eca3b7ac83d6e8e4be1..5ebfa2826c8e11c3edea9d0fad7e9a16cc058bfe 100644 (file)
@@ -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)."'";
                }