Skip to content

Commit bf2409d

Browse files
authored
Merge pull request #53 from mollie/issue-51/fix-send-request
Only json_encode data when there is data. Fixes #51
2 parents e50613b + 6730f06 commit bf2409d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Message/Request/AbstractMollieRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected function sendRequest($method, $endpoint, array $data = null)
7272
[
7373
'Authorization' => 'Bearer ' . $this->getApiKey()
7474
],
75-
json_encode($data)
75+
($data === null) ? null : json_encode($data)
7676
);
7777

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

0 commit comments

Comments
 (0)