Pagerfanta
Pagerfanta copied to clipboard
Protection from negative result offset
Issue when getCurrentPage returns 0, offset becomes -10
When does this happen? Current page should not be less than 1.
Ping.
Sorry for delay. As far as I debugged, there is the scenario for exception: in list page, go to Nth page, then filter to have 0 results and current page becomes 0, as there are 0 results. Then method calculateOffsetForCurrentPageResults subtracts 1 from 0 ant we get negative result causing app to brake.
Could you add a test case for this, please?
Ping.
Ping2