From 2b9d1c0e67610eacb8e93ba3fce7e13113fc0958 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Mon, 30 Jul 2012 14:06:46 +0100 Subject: [PATCH] Variable reference fixes --- src/Oauth2/Authentication/Server.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Oauth2/Authentication/Server.php b/src/Oauth2/Authentication/Server.php index bb381c79..9a4bd3aa 100644 --- a/src/Oauth2/Authentication/Server.php +++ b/src/Oauth2/Authentication/Server.php @@ -422,13 +422,13 @@ class Server // Verify the authorization code matches the client_id and the // request_uri - $sessionId = $this->db->validateAuthCode( + $session = $this->db->validateAuthCode( $params['client_id'], $params['redirect_uri'], $params['code'] ); - if ( ! $sessionId) { + if ( ! $session) { throw new OAuthServerClientException(sprintf($this->errors['invalid_grant'], 'code'), 9); @@ -442,7 +442,7 @@ class Server $accessTokenExpires = ($this->config['access_token_ttl'] === null) ? null : time() + $this->config['access_token_ttl']; $this->db->updateSession( - $sessionId, + $session['id'], null, $accessToken, $accessTokenExpires, @@ -451,7 +451,7 @@ class Server // Update the session's scopes to reference the access token $this->db->updateSessionScopeAccessToken( - $sessionId, + $session['id'], $accessToken );