From 2de3b57e976cc527a0c0ecee52d97adad03878a3 Mon Sep 17 00:00:00 2001 From: Mike Edinger Date: Wed, 10 Jan 2024 15:12:10 +0100 Subject: [PATCH] use empty array as fallback when meta is missing on response --- src/Http/BaseClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/BaseClient.php b/src/Http/BaseClient.php index de31470..25ba580 100644 --- a/src/Http/BaseClient.php +++ b/src/Http/BaseClient.php @@ -109,7 +109,7 @@ private function parseResponse($response): Response // throw new MalformedResponseException("Invalid response given. Meta property was missing from response."); // } - return new Response($content->data, $content->meta); + return new Response($content->data, $content->meta ?? []); } /**