mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-25 06:30:13 +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->setSession($session);
|
||||||
$accessToken->save();
|
$accessToken->save();
|
||||||
|
|
||||||
if ($refreshToken && $this->server->hasGrantType('refresh_token')) {
|
if (isset($refreshToken) && $this->server->hasGrantType('refresh_token')) {
|
||||||
$refreshToken->setAccessToken($accessToken);
|
$refreshToken->setAccessToken($accessToken);
|
||||||
$refreshToken->save();
|
$refreshToken->save();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user