Skip to content

Commit

Permalink
Merge pull request #53 from mollie/issue-51/fix-send-request
Browse files Browse the repository at this point in the history
Only json_encode data when there is data. Fixes #51
  • Loading branch information
barryvdh authored Jul 27, 2018
2 parents e50613b + 6730f06 commit bf2409d
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 bf2409d

Please sign in to comment.