From 6b59c91ec3ff2cf7dcd23dae96c5f236f024e8ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Szostok?= <126783699+pszostok@users.noreply.github.com> Date: Thu, 4 Apr 2024 12:11:42 +0200 Subject: [PATCH] Fix issue with empty response While using `getContactsFromList` function there is a way that stream response with null data - more info about can be found here https://stackoverflow.com/a/60510193 --- lib/Api/ContactsApi.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Api/ContactsApi.php b/lib/Api/ContactsApi.php index f1c9db2..7032be5 100644 --- a/lib/Api/ContactsApi.php +++ b/lib/Api/ContactsApi.php @@ -4107,6 +4107,7 @@ public function getContactsFromListWithHttpInfo($listId, $modifiedSince = null, if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { + $responseBody->rewind(); $content = $responseBody->getContents(); if ($returnType !== 'string') { $content = json_decode($content);