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

Call to a member function toArray() on null #208

Closed
veronica-severyn opened this issue Jun 7, 2018 · 2 comments
Closed

Call to a member function toArray() on null #208

veronica-severyn opened this issue Jun 7, 2018 · 2 comments

Comments

@veronica-severyn
Copy link

I saw this issue (#180) while looking for a solution.. but doesn't seem like it was similar to what I am having..

I am using RETS v. 1.8, searching for results in chunks of 500 records. The total results that exist = 668. It seems to to do just fine to do grab all of them, and then in the end fails on isPaginationBroken() function.. Can there an extra check be added to this function to check that there're actually results returned ?

screen shot 2018-06-06 at 8 35 23 pm

@troydavisson
Copy link
Owner

The debugging window there was incredibly helpful, thank you.

In this case, some additional checking could be done within that method, but I don't think it would change the result of what's happening (other than changing the error). In this case, it looks like it grabbed the 668 results and still got the indication from the server that there was more to get. Once it requested that and got nothing, it indicates that their support for pagination is broken.

In this instance, it still feels like throwing a \PHRETS\Exceptions\AutomaticPaginationError is the right thing, so I can clean up that method a little and make it behave a little better there.

@troydavisson
Copy link
Owner

Actually, since that method only detects if pagination is broken by seeing if the first records from both sets are the same, it can be a little softer when it gets 2 different types of results, so #230 may do what you need.

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

2 participants