From 88f59e06ea8f9f01da0c83463363e88d768729a6 Mon Sep 17 00:00:00 2001
From: Thijs Kinkhorst <thijs@kinkhorst.com>
Date: Thu, 15 Nov 2018 10:36:24 +0000
Subject: [PATCH] Default value to getArrayizeString must also be array if we
 want to prevent PHP notices

---
 modules/saml/lib/IdP/SAML2.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/saml/lib/IdP/SAML2.php b/modules/saml/lib/IdP/SAML2.php
index cfbb5476d..104cdfcd3 100644
--- a/modules/saml/lib/IdP/SAML2.php
+++ b/modules/saml/lib/IdP/SAML2.php
@@ -1004,9 +1004,9 @@ class SAML2
 
         if ($nameIdFormat === null || !isset($state['saml:NameID'][$nameIdFormat])) {
             // either not set in request, or not set to a format we supply. Fall back to old generation method
-            $nameIdFormat = current($spMetadata->getArrayizeString('NameIDFormat', null));
+            $nameIdFormat = current($spMetadata->getArrayizeString('NameIDFormat', []));
             if ($nameIdFormat === null) {
-                $nameIdFormat = current($idpMetadata->getArrayizeString('NameIDFormat', \SAML2\Constants::NAMEID_TRANSIENT));
+                $nameIdFormat = current($idpMetadata->getArrayizeString('NameIDFormat', [\SAML2\Constants::NAMEID_TRANSIENT]));
             }
         }
 
-- 
GitLab