Skip to content

Commit

Permalink
Fix start=0 in the pagination (#44069)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedik authored Sep 22, 2024
1 parent 7b5b790 commit 4c9786f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libraries/src/Router/SiteRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,11 @@ public function buildPaginationData(&$router, &$uri)
{
$limitstart = $uri->getVar('limitstart');

if ($limitstart !== null) {
$uri->setVar('start', (int) $uri->getVar('limitstart'));
$uri->delVar('limitstart');
if ($limitstart !== null && $limitstart !== '') {
$uri->setVar('start', (int) $limitstart);
}

$uri->delVar('limitstart');
}

/**
Expand Down

0 comments on commit 4c9786f

Please sign in to comment.