Skip to content
Snippets Groups Projects
Commit 1795b46a authored by Jamie McClelland's avatar Jamie McClelland
Browse files

avoid php errors because count()'ing a boolean

parent 96e140e6
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ class CRM_CivirulesPostTrigger_RelatedParticipantWhenActivityChanged extends CRM
$triggerData->setEntityId($objectId);
}
if (isset($this->triggerParams['activity_type_id']) && is_array($this->triggerParams['activity_type_id']) && count(isset($this->triggerParams['activity_type_id']))) {
if (isset($this->triggerParams['activity_type_id']) && is_array($this->triggerParams['activity_type_id']) && count($this->triggerParams['activity_type_id'])) {
$activity = civicrm_api3('Activity', 'getsingle', ['id' => $triggerData->getEntityId()]);
if (!in_array($activity['activity_type_id'], $this->triggerParams['activity_type_id'])) {
return;
......
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