ZF-3737: Setting itemCountPerPage after setCurrenPageNumber gives wrong results


If you call itemCountPerPage after setCurrentPageNumber you'll get wrong results. E.g.:

$paginator = Zend_Paginator::factory(array('item1', 'item2'));

Because the items per page is set to 10, the normalizePageNumber method which is called by setCurrentPageNumber will normalize the page number to 1. However, after setting the itemcount per page to 1, there are supposed to be two pages. However, the setCurrenPageNumber method already set the page number to 1.


Resolved in revision 10345