From 51e3e558303aa5f7a89e3f2c2226d7624460814e Mon Sep 17 00:00:00 2001
From: Thijs Kinkhorst <thijs@kinkhorst.com>
Date: Tue, 18 Jan 2022 09:15:44 +0000
Subject: [PATCH] Remove type from getEntityPropertyTranslation

Not all properties are of string type in metadata, so we need to
remove this so we can use the function for any type of language
keyed metadata item.
---
 lib/SimpleSAML/XHTML/Template.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php
index eca755310..ffbb53122 100644
--- a/lib/SimpleSAML/XHTML/Template.php
+++ b/lib/SimpleSAML/XHTML/Template.php
@@ -632,9 +632,11 @@ class Template extends Response
     /**
      * Search through entity metadata to find the best value for a
      * specific property. It will search in order for the current language, default
-     * language and fallback language; if not found it returns null.
+     * language and fallback language; it will return the property value (which
+     * can be a string, array or other type allowed in metadta, if not found it
+     * returns null.
      */
-    public function getEntityPropertyTranslation(string $property, array $data): ?string
+    public function getEntityPropertyTranslation(string $property, array $data)
     {
         $tryLanguages = $this->translator->getLanguage()->getPreferredLanguages();
 
-- 
GitLab