From 463fc724bbd2d2b09c7422233a57c915cd4aab8a Mon Sep 17 00:00:00 2001 From: Felix Huber Date: Mon, 4 Oct 2021 08:05:14 +0200 Subject: [PATCH] fix typo --- src/Fetcher/GuzzleFetcher.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Fetcher/GuzzleFetcher.php b/src/Fetcher/GuzzleFetcher.php index e015bc3..d65dd59 100644 --- a/src/Fetcher/GuzzleFetcher.php +++ b/src/Fetcher/GuzzleFetcher.php @@ -115,7 +115,8 @@ public function httpRequest(string $method, string $uri, array $headers = [], ar $this->logger->debug('Making ' . $method . ' request to ' . $uri); $start = microtime(true); - $body = count($body) > 5 ? json_encode($body) : null; + // json encode the body if present, else null it + $body = count($body) > 0 ? json_encode($body) : null; try { $response = $this->getClient()->request($method, $uri, [