Skip to content

Commit

Permalink
use empty array as fallback when meta is missing on response
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Edinger committed Jan 10, 2024
1 parent b224719 commit 2de3b57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/BaseClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? []);
}

/**
Expand Down

0 comments on commit 2de3b57

Please sign in to comment.