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

Avoid calling preg_replace on array content #619

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

IProSoft
Copy link

In our company we are using some extensions and patches to CRM Core that alter CRM_Core_BAO_MessageTemplate::sendTemplate params, adding an array of additional params like event info.

After our changes \Civi\Core\Event\GenericHookEvent $e->content contains one item that is not string, but array so calling preg_replace_callback on all items removes our data.

This change won't affect any of [uk.co.vedaconsulting.mosaico] functions but will save lot work in our side.

I will be very grateful if you implement this change

@mattwire
Copy link
Collaborator

@IProSoft Please can you add a (1 or 2 line) comment to the code to explain why so that a future developer understands and does not undo the changes.

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.

2 participants