Adding lower bound for page numbers in Controller::paginate() (Ticket #3683)

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6133 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-12-08 08:54:27 +00:00
parent 0b9f2c1b9d
commit e56b92255f
2 changed files with 7 additions and 0 deletions

View file

@ -952,6 +952,8 @@ class Controller extends Object {
if ($page == 'last' || $page >= $pageCount) {
$options['page'] = $page = $pageCount;
} elseif (intval($page) < 1) {
$options['page'] = $page = 1;
}
if (method_exists($object, 'paginate')) {