From 6a1f927a6c45b6e176dbc52d611459a67cd921e3 Mon Sep 17 00:00:00 2001 From: Brooke Bryan Date: Thu, 13 Nov 2014 12:20:59 +0000 Subject: [PATCH] Check refreshToken isset before attempting to call methods on it --- src/Grant/AuthCodeGrant.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Grant/AuthCodeGrant.php b/src/Grant/AuthCodeGrant.php index 60582d2b..8ac69270 100644 --- a/src/Grant/AuthCodeGrant.php +++ b/src/Grant/AuthCodeGrant.php @@ -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(); }