Skip to content

Commit

Permalink
change from if to assert to clear up IDE warning
Browse files Browse the repository at this point in the history
and remove incorrect log message
  • Loading branch information
briskt committed Jul 17, 2024
1 parent 7f630a0 commit 3e54c96
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions modules/sildisco/src/IdPDisco.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ private function getSPEntityIDAndReducedIdpList(): array
// Before the SimpleSAMLphp 2 upgrade, we added it to the state ourselves by overriding the SAML2.php file
parse_str(parse_url($_GET['return'], PHP_URL_QUERY), $returnState);
$state = Auth\State::loadState($returnState['AuthID'], 'saml:sp:sso');
if ($state && array_key_exists('SPMetadata', $state)) {
$spmd = $state['SPMetadata'];
$this->log('Updated SP metadata from ' . $this->spEntityId . ' to ' . $spmd['entityid']);
}
assert($state && array_key_exists('SPMetadata', $state));
$spmd = $state['SPMetadata'];
$spEntityId = $spmd['entityid'];

if (!empty($spEntityId)) {
Expand Down

0 comments on commit 3e54c96

Please sign in to comment.