Skip to content

Commit e6872c3

Browse files
authored
MultiAuth: Fix TypeError due to missing keys in source array (#1900)
Fixes #1899
1 parent b47efc3 commit e6872c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/multiauth/src/Auth/Source/MultiAuth.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ public function authenticate(Request $request, array &$state): Response
113113
) {
114114
$refs = array_values($state['saml:RequestedAuthnContext']['AuthnContextClassRef']);
115115
$new_sources = [];
116-
foreach ($this->sources as $source) {
116+
foreach ($this->sources as $key => $source) {
117117
$config_refs = $arrayUtils->arrayize($source['AuthnContextClassRef']);
118118
if (count(array_intersect($config_refs, $refs)) >= 1) {
119-
$new_sources[] = $source;
119+
$new_sources[$key] = $source;
120120
}
121121
}
122122
$state[self::SOURCESID] = $new_sources;

0 commit comments

Comments
 (0)