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/17752 Set avatar_img before the MCP template events on master by bonelifer · Pull Request #7101 · 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-17752

The events from PHPBB-17725, PHPBB-17726 and PHPBB-17727 (core.mcp_warn_user_modify_template_vars, core.mcp_warn_post_modify_template_vars and core.mcp_notes_user_modify_template_vars) pass avatar_img to compact(). On 3.3.x that variable comes from phpbb_get_user_avatar(), but master builds the avatar with the avatar.helper service, so after the 3.3.x merge the variable no longer exists. With debug on, the MCP warn-user, warn-post and user-notes pages show compact(): Undefined variable $avatar_img.

This sets $avatar_img = $avatar['html']; before each event. The helper's array always has an html key, so listeners get the rendered avatar HTML, as the docblocks describe and as on 3.3.x.

The new functional test tests/functional/mcp/mcp_warn_notes_test.php opens all three pages; no test covered them. Run locally in Docker with SQLite, it fails on current master with the warning above and passes with this change. The event exporter tests (1131) also pass.


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
[ticket/17752] Set avatar_img before the MCP template events on master
5adacfb
The events from PHPBB-17725, PHPBB-17726 and PHPBB-17727 pass avatar_img
to compact(), but master builds the avatar with the avatar.helper
service and never set that variable, which raised an undefined variable
warning on the MCP warn-user, warn-post and user-notes pages. Set it from
the helper's rendered html, so the events give listeners the same data
as on 3.3.x.

Add a functional test that opens all three pages; no test covered them.

PHPBB-17752
@bonelifer bonelifer mentioned this pull request Oct 20, 2026
Ban automatically after a set number of warnings phpbbmodders/ban-hammer#52
Draft
@bonelifer
Merge branch 'master' into ticket/17752
b9bee36
@marc1706 marc1706 added the 4.0 (Triton) 🔮 label Nov 2, 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.