Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getToken() Error ? #59

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
eaa09f0
Add New refresh token parameters
samoritano Aug 27, 2020
832bfe5
Add method for renewing token from refresh token
samoritano Aug 27, 2020
f806872
Restore v2 api URL
samoritano Aug 27, 2020
5030acd
Extract validateResponse methods for codeclimate
samoritano Aug 28, 2020
210f8f8
Updating composer.json description
samoritano Sep 26, 2020
38db9b1
Ignore whole .idea folder
samoritano Sep 26, 2020
402aad8
Remove russian Readme (sorry, zoonman!)
samoritano Sep 26, 2020
8e5e3b7
Update composer links
samoritano Sep 26, 2020
975e317
Update README
samoritano Sep 26, 2020
2d25a96
Modify author in composer.json
samoritano Sep 26, 2020
ff9d6d1
Update README file
samoritano Jan 14, 2021
8574cd9
Bump Guzzle to v7
samoritano Jan 14, 2021
67c95b7
added parameter raw data for query tunneling
ccorreia64 Jan 18, 2021
df7758a
Refactor query tunneling
ccorreia64 Jan 27, 2021
5413aa6
revert to guzzle v6
ccorreia64 Jan 28, 2021
a666352
fix response for empty body
n-gibs Oct 12, 2021
58491a3
update repo name
n-gibs Oct 26, 2021
c98c23f
fix package name
n-gibs Oct 26, 2021
b772718
fix readme
n-gibs Oct 26, 2021
c60f295
php8 and guzzle update
n-gibs Dec 1, 2021
e255cd9
remove unused files
n-gibs Dec 1, 2021
5ebddd7
remove travis file
n-gibs Dec 1, 2021
0568a98
remove code of conduct and edit readme
n-gibs Dec 1, 2021
66ce56b
Merge pull request #1 from AgencyPMG/php8-support
n-gibs Dec 1, 2021
4360425
Merge pull request #1 from AgencyPMG/master
samoritano Apr 21, 2022
c265268
fix: Proper composer command
podarok Sep 16, 2022
0574ebf
Merge pull request #2 from podarok/patch-1
samoritano Jan 21, 2023
e44e8f4
Use Query::build
esensgit Apr 14, 2023
59f36db
Update composer.json
esensgit Apr 14, 2023
9cd91f6
Update README.md
esensgit Apr 14, 2023
9f0d22b
Update README.md
esensgit Apr 14, 2023
ffe18dc
Removed validation of refresh data.
esensgit Apr 14, 2023
992dc56
Update AccessToken.php
esensgit Apr 14, 2023
3118bdf
Update AccessToken.php
esensgit Apr 18, 2023
08e522d
Update AccessToken.php
esensgit Apr 18, 2023
7ba21a9
Update README.md
esensgit Apr 19, 2023
440ba82
-- using Query::class insted of build_query()
jerry4rahul Aug 21, 2023
01aee49
Merge pull request #3 from esensgit/master
samoritano Nov 23, 2023
47ed031
Update readme
samoritano Dec 9, 2023
6e9666f
Merge pull request #4 from jerry4rahul/master
samoritano Dec 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix response for empty body
  • Loading branch information
n-gibs committed Oct 12, 2021
commit a6663522181c845595ea255e9d82bdfd3affb908
16 changes: 12 additions & 4 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,18 @@ public function renewTokenFromRefreshToken($refreshToken = '')
*/
public static function responseToArray($response)
{
return \GuzzleHttp\json_decode(
$response->getBody()->getContents(),
true
);
if ($contents = $response->getBody()->getContents()) {
return \GuzzleHttp\json_decode(
$contents,
true
);
}

if ($contents = $response->getHeaders()) {
return $contents;
}

return [];
}

/**
Expand Down