From 56980a8985e48398138965cd1dc11fdc5bc3ddd3 Mon Sep 17 00:00:00 2001 From: Chris Lewis Date: Wed, 20 Jan 2016 23:39:48 -0500 Subject: [PATCH] Properly retrieve message body from Guzzle prior to calling json_decode in CtctOAuth2 --- src/Ctct/Auth/CtctOAuth2.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ctct/Auth/CtctOAuth2.php b/src/Ctct/Auth/CtctOAuth2.php index 13df4e8..35d59a9 100755 --- a/src/Ctct/Auth/CtctOAuth2.php +++ b/src/Ctct/Auth/CtctOAuth2.php @@ -70,7 +70,7 @@ public function getAccessToken($code) { try { $response = json_decode($this->client->request('POST', $baseUrl, [ 'query' => $params - ]), true); + ])->getBody(), true); } catch (ClientException $e) { throw $this->convertException($e); } @@ -100,7 +100,7 @@ public function getTokenInfo($accessToken) { try { $response = json_decode($this->client->request('POST', $baseUrl, [ 'query' => array("access_token" => $accessToken) - ]), true); + ])->getBody(), true); } catch (ClientException $e) { throw $this->convertException($e); }