Skip to content

Commit 58daa28

Browse files
authored
Stop calling getLastPageNumber() when not necessary (#852)
1 parent b84cd28 commit 58daa28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Varien/Data/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ protected function _setIsLoaded($flag = true)
205205
*/
206206
public function getCurPage($displacement = 0)
207207
{
208-
if ($this->_curPage + $displacement < 1) {
208+
if ($this->_curPage + $displacement <= 1) {
209209
return 1;
210210
}
211211
elseif ($this->_curPage + $displacement > $this->getLastPageNumber()) {

0 commit comments

Comments
 (0)