Merge remote-tracking branch 'MarcMichalsky/issue/32'

[#25] Remove unnecessary json_decode() for custom_fields parameter
This commit is contained in:
Jens Schuppe 2020-06-25 13:30:43 +02:00
commit 675b682e0e

View file

@ -296,7 +296,7 @@ function civicrm_api3_twingle_donation_Submit($params) {
if (!empty($params['custom_fields'])) { if (!empty($params['custom_fields'])) {
$custom_field_mapping = $profile->getCustomFieldMapping(); $custom_field_mapping = $profile->getCustomFieldMapping();
foreach (json_decode($params['custom_fields']) as $twingle_field => $value) { foreach ($params['custom_fields'] as $twingle_field => $value) {
if (isset($custom_field_mapping[$twingle_field])) { if (isset($custom_field_mapping[$twingle_field])) {
// Get custom field definition to store values by entity the field // Get custom field definition to store values by entity the field
// extends. // extends.