From: nicolasconnault Date: Thu, 6 Aug 2009 01:17:13 +0000 (+0000) Subject: MDL-19756 Fixed regression in paging_bar X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4c629cc291136a4ab00493620ce461cafb4df959;p=moodle.git MDL-19756 Fixed regression in paging_bar --- diff --git a/lib/outputlib.php b/lib/outputlib.php index c906f42d19..a9d29b1680 100644 --- a/lib/outputlib.php +++ b/lib/outputlib.php @@ -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)) {