Skip to content

Commit

Permalink
fix when session is null
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland authored Oct 4, 2023
1 parent 900bcda commit e01cd55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
(new Extend\ApiSerializer(CurrentUserSerializer::class))
->attributes(function (CurrentUserSerializer $serializer, User $user, array $attributes) {
$session = $serializer->getRequest()->getAttribute('session');
$attributes['loginProvider'] = $session->get(AbstractOAuthController::SESSION_OAUTH2PROVIDER);
$attributes['loginProvider'] = $session?->get(AbstractOAuthController::SESSION_OAUTH2PROVIDER);

return $attributes;
}),
Expand Down

0 comments on commit e01cd55

Please sign in to comment.