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

Fatal error using $query = $client->users()->search($id); Offset 128 #251

Open
Argosth opened this issue Jul 19, 2023 · 0 comments
Open

Comments

@Argosth
Copy link

Argosth commented Jul 19, 2023

Hello,

I'm using the Tustin's PlayStation Network PHP library and running into an issue when I use the search method to retrieve users that match a specific criteria. Here's my current code:

php
Copy code
$query = $client->users()->search($id);
foreach($query as $user) {
// processing user information
}
The search method retrieves over 100 users as expected, but once it reaches a certain point (around the 128th user), it throws the following fatal error:

php
Copy code
Fatal error: Uncaught InvalidArgumentException: Offset 128 does not exist. in C:\Users...\vendor\tustin\psn-php\src\Iterator\AbstractApiIterator.php:156 Stack trace: #0 C:\Users...\vendor\tustin\psn-php\src\Iterator\UsersSearchIterator.php(73): Tustin\PlayStation\Iterator\AbstractApiIterator->getFromOffset(128) #1 C:\Users\my-file.php(120): Tustin\PlayStation\Iterator\UsersSearchIterator->current() #2 C:...\Argosth\index.php(167): include('C:\Users\\xC3\x93scar...') #3 {main} thrown in C:\Users...\Argosth\vendor\tustin\psn-php\src\Iterator\AbstractApiIterator.php on line 156
I am unsure of why this error is occurring or how to properly handle it. Does anyone have any ideas or suggestions on how to resolve this issue?

Thank you in advance for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant