]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19756 Fixed regression in paging_bar
authornicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 01:17:13 +0000 (01:17 +0000)
committernicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 01:17:13 +0000 (01:17 +0000)
lib/outputlib.php

index c906f42d19e4489b9ca540e6b7add0ed6a5f6988..a9d29b16808cd32875cf13e293c972d05fb1463c 100644 (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)) {