Skip to content

Commit

Permalink
Bugfix for 204 responses
Browse files Browse the repository at this point in the history
  • Loading branch information
stephangroen committed Nov 9, 2015
1 parent 24a63ee commit e0c574b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Picqer/Financials/Exact/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,11 @@ public function needsAuthentication()
private function parseResponse(Response $response)
{
try {

if ($response->getStatusCode() === 204) {
return [];
}

Psr7\rewind_body($response);
$json = json_decode($response->getBody()->getContents(), true);
if (array_key_exists('d', $json)) {
Expand Down

0 comments on commit e0c574b

Please sign in to comment.