mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
Check refreshToken isset before attempting to call methods on it
This commit is contained in:
@ -259,7 +259,7 @@ class AuthCodeGrant extends AbstractGrant
|
||||
$accessToken->setSession($session);
|
||||
$accessToken->save();
|
||||
|
||||
if ($refreshToken && $this->server->hasGrantType('refresh_token')) {
|
||||
if (isset($refreshToken) && $this->server->hasGrantType('refresh_token')) {
|
||||
$refreshToken->setAccessToken($accessToken);
|
||||
$refreshToken->save();
|
||||
}
|
||||
|
Reference in New Issue
Block a user