-
-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Regression) CRM_Mailing_ActionTokens - Degrade gracefully #9874
Conversation
@totten several test failures related to this. |
Most of the `CRM_*_Tokens` classes include a `checkActive()` function whic prevents them from trying to do anything if they don't have the necessary data. However, this one was missing it, which means that it attempts to evalute `{action.*}` tokens even when they're not valid.
484fc04
to
9091e03
Compare
OK, I've updated and rebased. It now passes those tests locally. |
The reported failure, |
To test this with a real scheduled reminder, used this procedure;
This procedure reproduced the hard-error (in In the case where one uses an invalid token, this PR doesn't provide a proper warning (that's a separate issue, CRM-20143). But at least we're back to not-crashing. |
test this please |
@eileenmcnaughton I think this seems sane should this get merged in? |
It feels sane (esp due to the sanity of the committer) but I'm struggling to understand how to determine if it is safe |
Yeah, I imagine that's tough if you haven't gotten your around the
|
(Regression) CRM_Mailing_ActionTokens - Degrade gracefully
Most of the
CRM_*_Tokens
classes include acheckActive()
function which prevents them from trying to do anything if they don't have the necessary data. However, this one was missing it, which means that it attempts to evalute{action.*}
tokens even when they're not valid.Note: This was reported on Stack Exchange. As of this writing, I haven't had a chance to reproduce or test the fix in a full deployment, but I'm opening the PR to get the test-suite and discussion going.