Skip to content

Commit 6730f06

Browse files
author
Martijn Smit
committed
Only json_encode data when there is data. Fixes #51
1 parent e50613b commit 6730f06

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)