From 4c629cc291136a4ab00493620ce461cafb4df959 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Thu, 6 Aug 2009 01:17:13 +0000 Subject: [PATCH] MDL-19756 Fixed regression in paging_bar --- lib/outputlib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/outputlib.php b/lib/outputlib.php index c906f42d19e..a9d29b16808 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)) {