summaryrefslogtreecommitdiff
path: root/includes/pager.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/pager.inc')
-rw-r--r--includes/pager.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/pager.inc b/includes/pager.inc
index a82fa9a55..c76a416a8 100644
--- a/includes/pager.inc
+++ b/includes/pager.inc
@@ -63,6 +63,10 @@ class PagerDefault extends SelectQueryExtender {
// Convert comma-separated $page to an array, used by other functions.
$pager_page_array = explode(',', $page);
+ if (!isset($pager_page_array[$this->element])) {
+ $pager_page_array[$this->element] = 0;
+ }
+
// We calculate the total of pages as ceil(items / limit).
$pager_total_items[$this->element] = $this->getCountQuery()->execute()->fetchField();
$pager_total[$this->element] = ceil($pager_total_items[$this->element] / $this->limit);