From 822e4c0c264874c4c2db978bb597bbb28fd81d20 Mon Sep 17 00:00:00 2001
From: Jaime Perez <jaime.perez@uninett.no>
Date: Mon, 6 Oct 2014 13:46:22 +0200
Subject: [PATCH] Solve issue #114.

---
 modules/core/templates/frontpage_federation.tpl.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/core/templates/frontpage_federation.tpl.php b/modules/core/templates/frontpage_federation.tpl.php
index 243aa4de4..e4f382765 100644
--- a/modules/core/templates/frontpage_federation.tpl.php
+++ b/modules/core/templates/frontpage_federation.tpl.php
@@ -60,9 +60,9 @@ foreach ($this->data['metaentries']['hosted'] AS $hm) {
 		echo '<br /><b>Deprecated</b>';
 	if ($hm['entityid'] !== $hm['metadata-index']) 
 		echo '<br />Index: ' . $hm['metadata-index'];
-	if (array_key_exists('name', $hm))
+	if (!empty($hm['name']))
 		echo '<br /><strong>' . $this->getTranslation(SimpleSAML_Utilities::arrayize($hm['name'], 'en')) . '</strong>';
-	if (array_key_exists('descr', $hm))
+	if (!empty($hm['descr']))
 		echo '<br /><strong>' . $this->getTranslation(SimpleSAML_Utilities::arrayize($hm['descr'], 'en')) . '</strong>';
 
 	echo '<br  />[ <a href="' . $hm['metadata-url'] . '">' . $this->t('{core:frontpage:show_metadata}') . '</a> ]';
@@ -81,9 +81,9 @@ foreach($this->data['metaentries']['remote'] AS $setkey => $set) {
 		echo ('<a href="' . 
 			htmlspecialchars(SimpleSAML_Module::getModuleURL('core/show_metadata.php', array('entityid' => $entry['entityid'], 'set' => $setkey ))) .
 			'">');
-		if (array_key_exists('name', $entry)) {
+		if (!empty($entry['name'])) {
 			echo htmlspecialchars($this->getTranslation(SimpleSAML_Utilities::arrayize($entry['name'], 'en')));
-		} elseif (array_key_exists('OrganizationDisplayName', $entry)) {
+		} elseif (!empty($entry['OrganizationDisplayName'])) {
 			echo htmlspecialchars($this->getTranslation(SimpleSAML_Utilities::arrayize($entry['OrganizationDisplayName'], 'en')));
 		} else {
 			echo htmlspecialchars($entry['entityid']);
-- 
GitLab