Skip to content

Commit

Permalink
Only json_encode data when there is data. Fixes #51
Browse files Browse the repository at this point in the history
  • Loading branch information
Martijn Smit committed Jul 27, 2018
1 parent e50613b commit 6730f06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Message/Request/AbstractMollieRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected function sendRequest($method, $endpoint, array $data = null)
[
'Authorization' => 'Bearer ' . $this->getApiKey()
],
json_encode($data)
($data === null) ? null : json_encode($data)
);

return json_decode($response->getBody(), true);
Expand Down

0 comments on commit 6730f06

Please sign in to comment.