Skip to content

Commit

Permalink
[BUGFIX] Check array key before it is used. Resolves issue #24
Browse files Browse the repository at this point in the history
  • Loading branch information
MFabse committed May 6, 2024
1 parent 8a7d82d commit 7ac2862
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Service/AuthenticationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ protected function initializeAuth0Connections(): bool
*/
public function getUser()
{
if ($this->login['status'] !== 'login' || $this->login['responsible'] === false || !isset($this->userInfo[$this->userIdentifier])) {
if (($this->login['status'] ?? '') !== 'login' || ($this->login['responsible'] ?? false) === false || !isset($this->userInfo[$this->userIdentifier])) {
return false;
}

Expand Down Expand Up @@ -378,7 +378,7 @@ public function getUser()

public function authUser(array $user): int
{
if ($this->login['responsible'] === false) {
if (($this->login['responsible'] ?? false) === false) {
// Service is not responsible. Check other services.
return 100;
}
Expand Down

0 comments on commit 7ac2862

Please sign in to comment.