Commit 79748fa8 authored by Dries's avatar Dries

- Patch #430904 by Berdir: fixed notice in case there are two pagers on one page.

parent a07e17a9
...@@ -63,6 +63,10 @@ public function execute() { ...@@ -63,6 +63,10 @@ public function execute() {
// Convert comma-separated $page to an array, used by other functions. // Convert comma-separated $page to an array, used by other functions.
$pager_page_array = explode(',', $page); $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). // We calculate the total of pages as ceil(items / limit).
$pager_total_items[$this->element] = $this->getCountQuery()->execute()->fetchField(); $pager_total_items[$this->element] = $this->getCountQuery()->execute()->fetchField();
$pager_total[$this->element] = ceil($pager_total_items[$this->element] / $this->limit); $pager_total[$this->element] = ceil($pager_total_items[$this->element] / $this->limit);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment