Skip to content
Snippets Groups Projects
Commit 79748fa8 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

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

parent a07e17a9
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -63,6 +63,10 @@ public function execute() {
// 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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment