From f6e93ca11e60d7e37a02a14fb4fd404eded54e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Hoffmann?= Date: Thu, 17 Mar 2022 08:21:42 +0100 Subject: [PATCH] BUGFIX: #14 prevent json encode of null, when no arguments are given --- Classes/Domain/Service/CleverReachApiService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Domain/Service/CleverReachApiService.php b/Classes/Domain/Service/CleverReachApiService.php index d4a018b..bb23662 100644 --- a/Classes/Domain/Service/CleverReachApiService.php +++ b/Classes/Domain/Service/CleverReachApiService.php @@ -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