mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-01 16:33:07 +05:30
Check refreshToken isset before attempting to call methods on it
This commit is contained in:
parent
b2c0933ee6
commit
6a1f927a6c
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user