diff --git a/CRM/Civicase/Hook/BuildForm/AddStyleFieldToCaseCustomGroups.php b/CRM/Civicase/Hook/BuildForm/AddStyleFieldToCaseCustomGroups.php index dc44a29a3..c727f16b0 100644 --- a/CRM/Civicase/Hook/BuildForm/AddStyleFieldToCaseCustomGroups.php +++ b/CRM/Civicase/Hook/BuildForm/AddStyleFieldToCaseCustomGroups.php @@ -34,7 +34,7 @@ public function run($form, $formName) { // This is the generic entity for all cases. $caseEntityNames[] = 'Case'; - $contactTypes = array_merge($contactTypes, $caseEntityNames); + $contactTypes = (is_array($contactTypes) && is_array($caseEntityNames)) ? array_merge($contactTypes, $caseEntityNames) : []; $form->assign('contactTypes', json_encode($contactTypes)); CRM_Core_Resources::singleton()->addSetting([