Skip to content

Resolved #5493 where template modifiers could use the wrong variable value - #5494

Open
TomJaeger wants to merge 1 commit into
7.devfrom
fix/early-variable-modifier-prefix
Open

TomJaeger wants to merge 1 commit into
7.devfrom
fix/early-variable-modifier-prefix

Conversation

@TomJaeger

Copy link
Copy Markdown
Contributor

Summary

When body was processed first, the early template parser could apply {embed:body2:length} to the value of body. The parser now checks for the full variable name followed by : before applying modifiers. The regression test covers both parameter orders.

Verification

  • The reported embed renders 3 and 8 in both parameter orders in a local PHP fixture.
  • All 114 template service tests passed on PHP 7.4, 8.2, and 8.5.
  • The legacy template suite passed 841 tests on PHP 8.2 and skipped five that require Xdebug.

Resolves #5493

@TomJaeger TomJaeger added the Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on. label Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modifiers on early-parsed variables use the wrong value when one variable name is a prefix of another (embed:body vs embed:body2)

1 participant