Skip to content
Snippets Groups Projects
Commit f567371f authored by Thijs Kinkhorst's avatar Thijs Kinkhorst
Browse files

Prevent notice when using array_shift with function output

parent e848f842
No related branches found
No related tags found
No related merge requests found
......@@ -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 = array_shift($spMetadata->getArrayizeString('NameIDFormat', null));
$nameIdFormat = current($spMetadata->getArrayizeString('NameIDFormat', null));
if ($nameIdFormat === null) {
$nameIdFormat = array_shift($idpMetadata->getArrayizeString('NameIDFormat', \SAML2\Constants::NAMEID_TRANSIENT));
$nameIdFormat = current($idpMetadata->getArrayizeString('NameIDFormat', \SAML2\Constants::NAMEID_TRANSIENT));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment