Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 2.0, 2.1
-
Fix Version/s: 2.1
-
Component/s: Core CiviCRM
-
Labels:None
Description
The following code from CRM_Group_Form_Edit::postProcess should probably belong in CRM_Contact_BAO_Group::create instead, so that the API also behaves properly:
if ( is_array( $params['group_type'] ) )
{ $params['group_type'] = CRM_Core_DAO::VALUE_SEPARATOR . implode( CRM_Core_DAO::VALUE_SEPARATOR, array_keys( $params['group_type'] ) ) . CRM_Core_DAO::VALUE_SEPARATOR; }else
{ $params['group_type'] = ''; }Then, the API documentation needs to instruct developers to send group_type as an array; or even better, add code above to also parse a comma separated string.