Index: library/Zend/Paginator.php =================================================================== --- library/Zend/Paginator.php (revision 22291) +++ library/Zend/Paginator.php (working copy) @@ -706,8 +706,10 @@ public function setItemCountPerPage($itemCountPerPage) { $this->_itemCountPerPage = (integer) $itemCountPerPage; - if ($this->_itemCountPerPage < 1) { + if ($this->_itemCountPerPage == 0) { $this->_itemCountPerPage = $this->getItemCountPerPage(); + } else if ($this->_itemCountPerPage < 0) { + $this->_itemCountPerPage = $this->getTotalItemCount(); } $this->_pageCount = $this->_calculatePageCount(); $this->_currentItems = null; Index: tests/Zend/PaginatorTest.php =================================================================== --- tests/Zend/PaginatorTest.php (revision 22291) +++ tests/Zend/PaginatorTest.php (working copy) @@ -516,6 +516,8 @@ $this->assertEquals(15, $this->_paginator->getItemCountPerPage()); $this->_paginator->setItemCountPerPage(0); $this->assertEquals(10, $this->_paginator->getItemCountPerPage()); + $this->_paginator->setItemCountPerPage(-1); + $this->assertEquals(101, $this->_paginator->getItemCountPerPage()); $this->_paginator->setItemCountPerPage(10); }