Explode giving issues on OSX

Created on 13 February 2025, 2 months ago

Problem/Motivation

I have an issue with the user synchronizer when lead mapping has been enabled and has more than 1 line for example.

"user_lead_mapping";s:46:"mail|email
field_profile_first_name|firstname"

It will go through the explode function
$mappings = explode("\n", $config->get('api.user_lead_mapping'));
and end up with the first field having email\r which then will not sync correctly.

This is likely caused by me developing on osx.

Steps to reproduce

Mac needed I guess.

- On admin/config/services/adv-mautic enable "Synchronize Drupal user with Mautic lead" and have 2 fields in there.
- Force the user synchronizer by updating a user and see the first field will have a \r at the end.

Proposed resolution

This is likely caused by me developing on osx and wonder if we can make the explode a bit more broad, like maybe.
$mappings = preg_split('/\n|\r\n?/', $config->get('api.user_lead_mapping'));

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇳🇱Netherlands robertragas

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024