Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changelogs/v4.7.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Release Date: Unreleased
- **HTTP:** Fixed a bug where query-string based routing truncated additional query parameters in `SiteURIFactory::parseRequestURI()` due to incorrect array index access.
- **HTTP:** Fixed a bug where `UploadedFile::move()` and `UploadedFile::store()` on Windows could store a file under a different name than `getName()` reported, or write its contents to an NTFS alternate data stream. Filenames ending in a period or space or containing a colon are now rejected, including explicitly supplied names.
- **Images:** Fixed a bug in `ImageMagickHandler::save()` where saving without an extension or with an unsupported extension threw an `ImagickException` instead of falling back to the image's format.
- **Pager:** Fixed a bug where `Pager::makeLinks()` threw a `TypeError` when `$group` was `null`.
- **Router:** Fixed a bug where `Router::replaceBackReferences()` failed to match and replace multi-digit back-references (such as `$10` or higher) when `Routing::$multipleSegmentsOneParam` was enabled.
- **Routing:** Fixed a bug where redirect routes containing the `{locale}` placeholder were not recognized as redirects and did not replace `{locale}` in the redirect target.
- **Security:** Fixed a bug where `Security::__construct()` threw a `TypeError` when the CSRF cookie was an array, causing an HTTP 500 response for affected requests.
Expand Down
2 changes: 1 addition & 1 deletion system/Pager/Pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function simpleLinks(string $group = 'default', string $template = 'defau
*/
public function makeLinks(int $page, ?int $perPage, int $total, string $template = 'default_full', int $segment = 0, ?string $group = 'default'): string
{
$group = $group === '' ? 'default' : $group;
$group = ($group === null || $group === '') ? 'default' : $group;

$this->store($group, $page, $perPage ?? $this->config->perPage, $total, $segment);

Expand Down
4 changes: 4 additions & 0 deletions tests/system/Pager/PagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,10 @@ public function testMakeLinks(): void
'?page=1',
$this->pager->makeLinks(1, 10, 1, 'default_full', 0, ''),
);
$this->assertStringContainsString(
'?page=1',
$this->pager->makeLinks(1, 10, 1, 'default_full', 0, null),
);
$this->assertStringContainsString(
'?page=1',
$this->pager->makeLinks(1, 10, 1, 'default_full', 0, 'default'),
Expand Down
Loading