Bastian Hofmann
@@ -256,7 +256,9 @@ class OAuth2_Service @@ -256,7 +256,9 @@ class OAuth2_Service
256 if ($token->getLifeTime() && $token->getLifeTime() < time()) { 256 if ($token->getLifeTime() && $token->getLifeTime() < time()) {
257 $token = $this->refreshAccessToken($token); 257 $token = $this->refreshAccessToken($token);
258 } 258 }
259 - 259 +
  260 + $parameters = null;
  261 +
260 if (!$this->_configuration->getUseOnlyAuthorizationHeader()){ 262 if (!$this->_configuration->getUseOnlyAuthorizationHeader()){
261 /* 263 /*
262 http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.1 264 http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.1
@@ -281,8 +283,6 @@ class OAuth2_Service @@ -281,8 +283,6 @@ class OAuth2_Service
281 $endpoint .= (strpos($endpoint, '?') !== false ? '&' : '?') . http_build_query($uriParameters); 283 $endpoint .= (strpos($endpoint, '?') !== false ? '&' : '?') . http_build_query($uriParameters);
282 } 284 }
283 285
284 - $parameters = null;  
285 -  
286 $header = array('Authorization: OAuth ' . $token->getAccessToken()); 286 $header = array('Authorization: OAuth ' . $token->getAccessToken());
287 287
288 $http = new OAuth2_HttpClient($endpoint, $method, $parameters, $header); 288 $http = new OAuth2_HttpClient($endpoint, $method, $parameters, $header);