Merge pull request #15507 from Raroun/fix-channel-pagination

Fix pagination by using array_key_first/last in Channel and Network module
This commit is contained in:
Michael Vogel 2026-02-12 11:32:04 +01:00 committed by GitHub
commit b520b0af27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -131,8 +131,8 @@ class Channel extends Timeline
$pager = new BoundariesPager(
$this->l10n,
$this->args->getQueryString(),
$items[0][$order],
$items[count($items) - 1][$order],
$items[array_key_first($items)][$order],
$items[array_key_last($items)][$order],
$this->itemsPerPage
);

View file

@ -307,8 +307,8 @@ class Network extends Timeline
$pager = new BoundariesPager(
$this->l10n,
$this->args->getQueryString(),
$items[0][$this->order] ?? null,
$items[count($items) - 1][$this->order] ?? null,
$items[array_key_first($items)][$this->order] ?? null,
$items[array_key_last($items)][$this->order] ?? null,
$this->itemsPerPage
);