Skip to content

Conversation

@smg6511
Copy link
Collaborator

@smg6511 smg6511 commented Oct 21, 2025

What does it do?

Move $policyTable statement up in scope to avoid error that occurs when $rgEnabled is false and $catEnabled is true.

Why is it needed?

In certain scenarios the condition above happens and the error log can quickly fill up with the following warning:
[...server_path]/core/src/Revolution/modTemplateVar.php : 1141) PHP warning: Undefined variable $policyTable

How to test

It's a bit of a needle in the haystack, so I don't have a suggested way to trigger the problematic condition. However, logically, the change made should be done regardless.

Related issue(s)/PR(s)

This is a port of the same change made for 2.x some time ago (PR #16427).

Port change from 2.x (PR modxcms#16427)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant