if (!empty($contactDetails)) {
foreach ($contactDetails as $key => $value) {
$assignee = CRM_Activity_BAO_ActivityAssignment::retrieveAssigneeIdsByActivityId($key);
+ $assigneeContact = [];
foreach ($assignee as $values) {
$assigneeContact[] = CRM_Contact_BAO_Contact::displayName($values);
}