Skip to content

Commit a835f50

Browse files
authored
fix: Null coalesce next link to prevent type error (#142)
* fix: Null coalesce next link to prevent type error * docs(release): v1.12.1
1 parent 74851d4 commit a835f50

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx&utm_medium=paddle-php-sdk) for information about changes to the Paddle Billing platform, the Paddle API, and other developer tools.
88

9+
## [1.12.1] - 2025-11-03
10+
11+
## Fixed
12+
13+
- Calls to fetch an empty page of events no longer fail — handling `null` pagination `next` response
14+
915
## [1.12.0] - 2025-10-07
1016

1117
### Added

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
class Client
5555
{
56-
private const SDK_VERSION = '1.12.0';
56+
private const SDK_VERSION = '1.12.1';
5757

5858
public readonly LoggerInterface $logger;
5959
public readonly Options $options;

src/ResponseParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function getPagination(): Pagination
3939
{
4040
return new Pagination(
4141
perPage: $this->body['meta']['pagination']['per_page'],
42-
next: $this->body['meta']['pagination']['next'],
42+
next: $this->body['meta']['pagination']['next'] ?? '',
4343
hasMore: $this->body['meta']['pagination']['has_more'],
4444
estimatedTotal: $this->body['meta']['pagination']['estimated_total'],
4545
);

0 commit comments

Comments
 (0)