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

Fixed issue with multiple values in a custom field and AbstractGetSingleAction.

parent d43fa7cc
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ Version 1.42 (not yet released)
* Escaping configuration values of custom fields and custom groups. In case a @ or % sign is present in the help or description text
of the custom field or custom group.
* Fixed issue with multiple values in a custom field and AbstractGetSingleAction.
Version 1.41
------------
......
......@@ -116,7 +116,13 @@ abstract class AbstractGetSingleAction extends AbstractAction {
if (substr($custom_id, -3) === '_id') {
$custom_id = substr($custom_id, 0, -3);
unset($entity[$field]);
$entity['custom_'.$custom_id] = $value;
if (is_array($value)) {
$entity['custom_' . $custom_id] = array_keys($value);
} else {
$entity['custom_' . $custom_id] = $value;
}
} elseif (is_numeric($custom_id) && is_array($value)) {
$entity['custom_' . $custom_id] = array_keys($value);
}
}
return $entity;
......
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