Skip to content

Commit e5a3117

Browse files
committed
fix: avoid doubled page query parameters
1 parent 96b0321 commit e5a3117

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

phpmyfaq/src/phpMyFAQ/Pagination.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ protected function renderUrl(string $url = '', int $page = 1): string
171171

172172
$urlToParse = '%s%s%s=%d';
173173
$cleanedUrl = Strings::preg_replace(
174-
['$&(amp;|)' . $this->urlConfig->pageParamName . '=(\d+)$'],
174+
['/[?&](amp;|)' . $this->urlConfig->pageParamName . '=(\d+)/'],
175175
replacement: '',
176176
subject: $url,
177177
);

0 commit comments

Comments
 (0)