mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-03 18:12:40 +00:00
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:
parent
0b9f2c1b9d
commit
e56b92255f
2 changed files with 7 additions and 0 deletions
|
@ -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')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue