]> BookStack Code Mirror - bookstack/commitdiff
AccessToken empty array parameter on null
authorJasper Weyne <redacted>
Thu, 9 Jul 2020 16:29:44 +0000 (18:29 +0200)
committerJasper Weyne <redacted>
Thu, 9 Jul 2020 16:29:44 +0000 (18:29 +0200)
app/Auth/Access/OpenIdService.php

index fc0c0029856e69091d252ea77f3c6343b80bcea8..3d8818fa5d519f4ff890a2cf4cd563665c517c1c 100644 (file)
@@ -63,7 +63,7 @@ class OpenIdService extends ExternalAuthService
     {
         // Retrieve access token for current session
         $json = session()->get('openid_token');
-        $accessToken = new AccessToken(json_decode($json, true));
+        $accessToken = new AccessToken(json_decode($json, true) ?? []);
 
         // Check if both the access token and the ID token (if present) are unexpired
         $idToken = $accessToken->getIdToken();