Skip to content

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

Open
banghamid wants to merge 1 commit into
codeigniter4:developfrom
banghamid:fix/pager-makelinks-null-group
Open

banghamid wants to merge 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

This branch has not been deployed

No deployments
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.

2 participants