Skip to content
Snippets Groups Projects
Commit c38ac215 authored by jaapjansma's avatar jaapjansma
Browse files

Merge branch 'CIVICRM-2005' into 'master'

CiviCRM Action Provider, Explode function does not trim spaces from exploded values which causes CiviCRM API call to fail when updating a custom field with multiple values.

See merge request !80
parents 5f4db34c 461c2719
No related branches found
No related tags found
1 merge request!80CiviCRM Action Provider, Explode function does not trim spaces from exploded values which causes CiviCRM API call to fail when updating a custom field with multiple values.
......@@ -93,12 +93,17 @@ class ExplodeList extends AbstractAction {
ParameterBagInterface $parameters,
ParameterBagInterface $output
) {
$array_value = explode(
$this->configuration->getParameter('separator'),
$parameters->getParameter('value')
);
// Remove all leading/trailing spaces from each value
$array_value_trim = array_map('trim', $array_value);
$output->setParameter(
'value',
explode(
$this->configuration->getParameter('separator'),
$parameters->getParameter('value')
)
$array_value_trim
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment