$acl[$dao->id]['is_active'] = $dao->is_active;
if ($acl[$dao->id]['entity_id']) {
- $acl[$dao->id]['entity'] = $roles[$acl[$dao->id]['entity_id']];
+ $acl[$dao->id]['entity'] = CRM_Utils_Array::value($acl[$dao->id]['entity_id'], $roles);
}
else {
$acl[$dao->id]['entity'] = ts('Everyone');
$entityRoles[$dao->id] = array();
CRM_Core_DAO::storeValues($dao, $entityRoles[$dao->id]);
- $entityRoles[$dao->id]['acl_role'] = $aclRoles[$dao->acl_role_id];
+ $entityRoles[$dao->id]['acl_role'] = CRM_Utils_Array::value($dao->acl_role_id, $aclRoles);
$entityRoles[$dao->id]['entity'] = $groups[$dao->entity_id];
// form all action links