GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Ticket/17753 Log unbanned items as a string and fix unban user notes by bonelifer · Pull Request #7102 · phpbb/phpbb

Conversation

@bonelifer

@bonelifer bonelifer commented Oct 20, 2026

Copy link
Copy Markdown
Member

Checklist:

  • Correct branch: master for new features; 3.3.x for fixes
  • Tests pass
  • Code follows coding guidelines: master and 3.3.x
  • Commit follows commit message format

Tracker ticket:

https://tracker.phpbb.com/browse/PHPBB-17753

\phpbb\ban\manager::unban() logged [$unbanned_users], an array, where ban() logs a joined string. Showing the admin or moderator log then gave Array to string conversion in language::lang_array(), and email and IP unbans named nothing, because after_unban() returns an empty array for those types. This logs the unbanned usernames, or the email addresses or IPs, as one string, the way ban() does.

The user-notes loop also used the values of after_unban() (usernames) as user ids, so unbanned users never got their note. It now loops over the keys.

The new test_unban_logs in tests/ban/ban_manager_test.php covers user, email and IP unbans. Run locally in Docker with SQLite, it fails on current master and passes with this change; the rest of the ban manager tests, the session ban check and the email validation tests also pass.

Log rows already written with an array still warn when shown. This PR leaves them alone; a migration could rewrite them if wanted.


Investigated and written by Claude on behalf of William Jacoby (bonelifer).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
bonelifer added 2 commits October 20, 2026 03:33
@bonelifer
[ticket/17753] Log unbanned items as a string and fix unban user notes
2abe8b8
ban\manager::unban() logged [$unbanned_users], an array, where ban()
logs a joined string, so showing the admin or moderator log gave an
"Array to string conversion" warning, and email and IP unbans named
nothing. Log the unbanned usernames, or the email addresses or IPs, as
one string, like ban() does.

The user-notes loop also took the usernames from after_unban() as user
ids; loop over its keys instead. Add a test for all three ban types.

PHPBB-17753
@bonelifer
Merge branch 'master' into ticket/17753
8732881
@marc1706 marc1706 added the 4.0 (Triton) 🔮 label Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

4.0 (Triton) 🔮

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@bonelifer @marc1706
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.