Skip to content

Commit

Permalink
Merge pull request #15 from punktDeForks/bugfix/Issue-14-bad-request-…
Browse files Browse the repository at this point in the history
…deactivate-receiver

BUGFIX: #14 prevent json encode of null, when no arguments are given
  • Loading branch information
Nikdro authored May 25, 2022
2 parents 6df63a5 + f6e93ca commit f20f172
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Domain/Service/CleverReachApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ private function callUri($method, Uri $uri, array $arguments = null)
'Content-Type' => 'application/json; charset=utf-8',
'Authorization' => 'Bearer ' . $this->apiToken
],
$method !== 'GET' ? \GuzzleHttp\json_encode($arguments) : null
$method !== 'GET' && $arguments !== null ? \GuzzleHttp\json_encode($arguments) : null
);

//Fire request and get response-body
Expand Down

0 comments on commit f20f172

Please sign in to comment.