From e0c574b3861d8e4fe036b24e9dc790f82b1f493c Mon Sep 17 00:00:00 2001 From: Stephan Groen Date: Mon, 9 Nov 2015 10:42:16 +0100 Subject: [PATCH] Bugfix for 204 responses --- src/Picqer/Financials/Exact/Connection.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Picqer/Financials/Exact/Connection.php b/src/Picqer/Financials/Exact/Connection.php index f0a2fcd1..20dd4094 100644 --- a/src/Picqer/Financials/Exact/Connection.php +++ b/src/Picqer/Financials/Exact/Connection.php @@ -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)) {