diff --git a/src/League/OAuth2/Server/Storage/DBAL/Session.php b/src/League/OAuth2/Server/Storage/DBAL/Session.php index 58f8e515..7423601f 100644 --- a/src/League/OAuth2/Server/Storage/DBAL/Session.php +++ b/src/League/OAuth2/Server/Storage/DBAL/Session.php @@ -150,7 +150,7 @@ class Session implements SessionInterface public function getAuthCodeScopes($oauthSessionAuthCodeId) { - $stmt = $db->prepare('SELECT scope_id FROM `oauth_session_authcode_scopes` WHERE oauth_session_authcode_id = :authCodeId'); + $stmt = $this->db->prepare('SELECT scope_id FROM `oauth_session_authcode_scopes` WHERE oauth_session_authcode_id = :authCodeId'); $stmt->bindValue(':authCodeId', $oauthSessionAuthCodeId); $stmt->execute();