mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-19756 Fixed regression in paging_bar
This commit is contained in:
parent
591f703112
commit
4c629cc291
@ -5268,7 +5268,7 @@ class moodle_paging_bar extends moodle_html_component {
|
||||
/**
|
||||
* @var int $page The page you are currently viewing
|
||||
*/
|
||||
public $page;
|
||||
public $page = 0;
|
||||
/**
|
||||
* @var int $perpage The number of entries that should be shown per page
|
||||
*/
|
||||
@ -5315,7 +5315,7 @@ class moodle_paging_bar extends moodle_html_component {
|
||||
if (empty($this->totalcount)) {
|
||||
throw new coding_exception('moodle_paging_bar requires a totalcount value.');
|
||||
}
|
||||
if (empty($this->page)) {
|
||||
if (!isset($this->page) || is_null($this->page)) {
|
||||
throw new coding_exception('moodle_paging_bar requires a page value.');
|
||||
}
|
||||
if (empty($this->perpage)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user