Skip to content

fix(Pager): handle null group in Pager::makeLinks() - #10781

Merged
paulbalandan merged 1 commit into
codeigniter4:developfrom
banghamid:fix/pager-makelinks-null-group
Nov 19, 2026
Merged

paulbalandan merged 1 commit into
codeigniter4:developfrom
banghamid:fix/pager-makelinks-null-group

Conversation

@banghamid

@banghamid banghamid commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Description
Pager::makeLinks() declares ?string $group = 'default', but previously only checked $group === '' ? 'default' : $group. Passing null for $group forwarded null to Pager::store(string $group, ...), causing a TypeError.

This PR falls back to 'default' when $group is null or '', adds a regression test in PagerTest::testMakeLinks(), and adds a changelog entry in docs/changelogs/v4.7.7.md.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@carson-codeigniter4 carson-codeigniter4 Bot added the bug Verified issues on the current code behavior or pull requests that will fix them label Nov 18, 2026
@paulbalandan paulbalandan changed the title fix(Pager): handle null group in Pager::makeLinks() fix(Pager): handle null group in Pager::makeLinks() Nov 19, 2026
@paulbalandan
paulbalandan merged commit 28da6fe into codeigniter4:develop Nov 19, 2026
63 checks passed
@paulbalandan

Copy link
Copy Markdown
Member

Thanks @banghamid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants