Skip to content
Snippets Groups Projects
Commit f4675749 authored by Guy Halse's avatar Guy Halse
Browse files

Casting as a (string) doesn't flatten an array

parent 06c3de3f
Branches
Tags
No related merge requests found
......@@ -986,9 +986,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 = (string)$spMetadata->getArrayizeString('NameIDFormat', null);
$nameIdFormat = array_values($spMetadata->getArrayizeString('NameIDFormat', null))[0];
if ($nameIdFormat === null) {
$nameIdFormat = (string)$idpMetadata->getArrayizeString('NameIDFormat', \SAML2\Constants::NAMEID_TRANSIENT);
$nameIdFormat = array_values($idpMetadata->getArrayizeString('NameIDFormat', \SAML2\Constants::NAMEID_TRANSIENT))[0];
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment