diff --git a/CRM/Civicase/APIHelpers/CustomValues.php b/CRM/Civicase/APIHelpers/CustomValues.php index b745cdad5..92b028c94 100644 --- a/CRM/Civicase/APIHelpers/CustomValues.php +++ b/CRM/Civicase/APIHelpers/CustomValues.php @@ -73,7 +73,7 @@ public static function getTreeParams(array $params) { 'custom_value' => [], ]; foreach (array_keys($options['return']) as $r) { - list($type, $field) = explode('.', $r); + [$type, $field] = explode('.', $r); if (isset($toReturn[$type])) { $toReturn[$type][] = $field; } @@ -103,7 +103,6 @@ public static function getTreeParams(array $params) { break; case 'Participant': - // Todo. } $treeParams = [ 'entityType' => $params['entity_type'], @@ -163,7 +162,7 @@ public static function formatTreeResults(array $tree, array &$result, array $toR if (!empty($fieldInfo['customValue'])) { $field['value'] = CRM_Utils_Array::first($fieldInfo['customValue']); if (!$toReturn['custom_value'] || in_array('display', $toReturn['custom_value'])) { - $field['value']['display'] = CRM_Core_BAO_CustomField::displayValue($field['value']['data'], $fieldInfo); + $field['value']['display'] = CRM_Core_BAO_CustomField::displayValue($field['value']['data'], $fieldInfo['id']); } foreach (array_keys($field['value']) as $key) { if ($toReturn['custom_value'] && !in_array($key, $toReturn['custom_value'])) {