diff --git a/src/Module/Conversation/Channel.php b/src/Module/Conversation/Channel.php index 108846034c..b8d8ba4ff0 100644 --- a/src/Module/Conversation/Channel.php +++ b/src/Module/Conversation/Channel.php @@ -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 ); diff --git a/src/Module/Conversation/Network.php b/src/Module/Conversation/Network.php index 5bcde53783..cf55f3546d 100644 --- a/src/Module/Conversation/Network.php +++ b/src/Module/Conversation/Network.php @@ -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 );