mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix notice in PaginatorHelper when model params are not available.
This commit is contained in:
parent
8a91878033
commit
d37721ab0e
1 changed files with 2 additions and 2 deletions
|
@ -706,7 +706,7 @@ class PaginatorHelper extends AppHelper {
|
|||
* - `currentClass` Class for wrapper tag on current active page, defaults to 'current'
|
||||
* - `currentTag` Tag to use for current page number, defaults to null
|
||||
*
|
||||
* @param array $options Options for the numbers, (before, after, model, modulus, separator)
|
||||
* @param array|bool $options Options for the numbers, (before, after, model, modulus, separator)
|
||||
* @return string Numbers string.
|
||||
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html#PaginatorHelper::numbers
|
||||
*/
|
||||
|
@ -727,7 +727,7 @@ class PaginatorHelper extends AppHelper {
|
|||
$params = (array)$this->params($options['model']) + array('page' => 1);
|
||||
unset($options['model']);
|
||||
|
||||
if ($params['pageCount'] <= 1) {
|
||||
if (empty($params['pageCount']) || $params['pageCount'] <= 1) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue