Skip to content
Snippets Groups Projects
Commit 5759e15c authored by Carlos Capote's avatar Carlos Capote
Browse files

fixes a particular error-case related with #53

parent 39ec384e
No related branches found
No related tags found
No related merge requests found
......@@ -27,13 +27,17 @@ class CRM_CivirulesActions_Activity_Add extends CRM_CivirulesActions_Generic_Api
$assignee = array();
if (is_array($action_params['assignee_contact_id'])) {
foreach($action_params['assignee_contact_id'] as $contact_id) {
$assignee[] = $contact_id;
if($contact_id) {
$assignee[] = $contact_id;
}
}
} else {
$assignee[] = $action_params['assignee_contact_id'];
}
if (count($assignee)) {
$params['assignee_contact_id'] = $action_params['assignee_contact_id'];
} else {
$params['assignee_contact_id'] = '';
}
}
return $params;
......@@ -117,4 +121,4 @@ class CRM_CivirulesActions_Activity_Add extends CRM_CivirulesActions_Generic_Api
return 'create';
}
}
\ No newline at end of file
}
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