Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError Recurly\BaseClient::nextPage(): Return value must be of type Recurly\Page, Recurly\EmptyResourcereturned #787

Open
crystinutzaa opened this issue Jan 3, 2024 · 0 comments
Labels

Comments

@crystinutzaa
Copy link

Describe the bug

We get an error in our production related to a Type Error due to nextPage() which returns an EmptyResource instead of Recurly/Page resource. This error started to appear suddenly since 2024-01-02 12:58:40 pm GMT+2

To Reproduce

In our production implementation we started to receive the error with this complete stack trace:

TypeError Recurly\BaseClient::nextPage(): Return value must be of type Recurly\Page, Recurly\EmptyResource returned
(Most recent call first)
2 non-project frames
at
(unknown method)(/var/www/vendor/recurly/recurly-client/lib/recurly/base_client.php:143)
Recurly\BaseClient::nextPage(/var/www/vendor/recurly/recurly-client/lib/recurly/pager.php:89)
at
Recurly\Pager::rewind(/var/www/models/classes/Invoices.php:25)

In our implementation we have $invoices = $this->_client->listAccountInvoices('code-' . $account_code);

Expected behavior

Either allow to return Recurly\EmptyResource or return an empty Recurly\Page and address the type error.

Your Environment

  • Which version of this library are you using? : "recurly/recurly-client": "^4.27",
  • "php": ">=8.1",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant