helpscout/helpscout-api-php

Expected a value greater than 0. Got: 0

arbind-ladybird opened this issue · 5 comments

when trying to get next page via $records = $records->getNextPage(); getting error like ** Expected a value greater than 0. Got: 0
**
Can anyone suggest me why I'm getting this error.

Thanks for reaching out @arbind-ladybird -- we'll pass along this note to our engineers to investigate and get you a response when our team return from the Thanksgiving break from 11/30 onwards.

bkuhl commented

Hey @arbind-ladybird,

getNextPage() actually loads the next page of results using data provided by the last request. It seems like for this error to happen, there must be a scenario where the public API is providing a 0 for the next page value. Can you share the values of the output of $records->getTotalPageCount(); and $records->getPageNumber(); when this error is encountered?

bkuhl commented

A fix is now available for this scenario in in v3.3.1