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

Too few rows returned causes null reference exception #187

Open
vdwrcarlson opened this issue Dec 21, 2017 · 0 comments
Open

Too few rows returned causes null reference exception #187

vdwrcarlson opened this issue Dec 21, 2017 · 0 comments

Comments

@vdwrcarlson
Copy link

We're getting this error intermittently when fetching listings:

PHP Fatal error:  Call to a member function toArray() on null in /home/lang/vendor/troydavisson/phrets/src/Parsers/Search/RecursiveOneX.php on line 81

I enabled verbose debugging and found that it happens when the server claims that there are more listings than are actually returned. Here's an excerpt from the debug log:

[2017-12-20 16:28:25] PHRETS.DEBUG: Sending HTTP Request for http://neren.rets.paragonrels.com:80/rets/fnisrets.aspx/NEREN/search (Search) {"auth":["xxxxxxxxx","xxxxxxxxx","digest"],"headers":{"User-Agent":"PHRETS/2.0","RETS-Version":"RETS/1.7.2","Accept-Encoding":"gzip","Accept":"*/*"},"curl":{"10031":"/tmp/phretsIm3efJ"},"query":{"SearchType":"Property","Class":"CS_3","Query":"(L_Status=1_0,1_1)","QueryType":"DMQL2","Count":1,"Format":"COMPACT-DECODED","Limit":99999999,"StandardNames":0,"Select":"L_ListingID,L_NumAcres,LO1_ShortName,LA1_AgentID,L_Status,L_AskingPrice,LM_int4_23,L_AddressStreet,L_AddressNumber,L_City,L_Zip,L_Area,LM_Int1_18,VT_VTourURL,LR_remarks22,L_Type_"}} []
[2017-12-20 16:28:46] PHRETS.DEBUG: Response: HTTP 200 [] []
[2017-12-20 16:28:46] PHRETS.DEBUG: 16 column headers/fields given [] []
[2017-12-20 16:28:46] PHRETS.DEBUG: 1426 total results found [] []
[2017-12-20 16:28:46] PHRETS.DEBUG: 1425 results given [] []
[2017-12-20 16:28:46] PHRETS.DEBUG: Maximum rows returned in response [] []
[2017-12-20 16:28:46] PHRETS.DEBUG: Continuing pagination... [] []
[2017-12-20 16:28:46] PHRETS.DEBUG: Current count collected already: 1425 [] []
[2017-12-20 16:28:46] PHRETS.DEBUG: Sending HTTP Request for http://neren.rets.paragonrels.com:80/rets/fnisrets.aspx/NEREN/search (Search) {"auth":["xxxxxxxxx","xxxxxxxxx","digest"],"headers":{"User-Agent":"PHRETS/2.0","RETS-Version":"RETS/1.7.2","Accept-Encoding":"gzip","Accept":"*/*"},"curl":{"10031":"/tmp/phretsoZZwxb"},"query":{"SearchType":"Property","Class":"CS_3","Query":"(L_Status=1_0,1_1)","QueryType":"DMQL2","Count":1,"Format":"COMPACT-DECODED","Limit":99999999,"StandardNames":0,"Select":"L_ListingID,L_NumAcres,LO1_ShortName,LA1_AgentID,L_Status,L_AskingPrice,LM_int4_23,L_AddressStreet,L_AddressNumber,L_City,L_Zip,L_Area,LM_Int1_18,VT_VTourURL,LR_remarks22,L_Type_","Offset":1426}} []
[2017-12-20 16:28:47] PHRETS.DEBUG: Response: HTTP 200 [] []
[2017-12-20 16:28:47] PHRETS.DEBUG: 16 column headers/fields given [] []
[2017-12-20 16:28:47] PHRETS.DEBUG: 1425 total results found [] []
[2017-12-20 16:28:47] PHRETS.DEBUG: 0 results given [] []

Notice that it says there are 1426 results found, but 1425 results given. I'm assuming this means a listing was removed during the query, but I'm not sure.

We are running version 2.5 of phrets.

Thank you!

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