Skip to content
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

Do not replace error handler twice, avoiding infinite loops #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jensschuppe
Copy link
Collaborator

Fixes #37.

The extension replaces the error handler to catch Smarty errors while validating the settings form (i.e. the actual greeting formulas). When the code replacing the error handler was called twice, the original error handler will be lost and the extension can not restore it. In the case of an error (which seems to be a deprecation warning being handled by the error handler), this leads to an infinite loop into our error handler.

This PR guards the error handler replacement by checking whether the replacement has already been done. Also, this clears the static class member which is being used for keeping track of the original error handler when the extension restores it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status:needs review Code needs review and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatibility with CIviCRM 5.60 - Blank page when saving new greetings
1 participant