MDL-19756 Fixed regression in paging_bar

This commit is contained in:
nicolasconnault 2009-08-06 01:17:13 +00:00
parent 591f703112
commit 4c629cc291

View File

@ -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)) {