X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FBAO%2FParticipant.php;h=14faa1aee44ad5e7d4005e1024d13b2e61ee0dd8;hb=7577274a27f566676be601099f9bde6e14e8fb44;hp=2f26fe66aaddbcdd9176e78fe07a36c13a71d5f7;hpb=7874afef09626fe1834da80eb2f2715bfb09e1f4;p=civicrm-core.git diff --git a/CRM/Event/BAO/Participant.php b/CRM/Event/BAO/Participant.php index 2f26fe66aa..14faa1aee4 100644 --- a/CRM/Event/BAO/Participant.php +++ b/CRM/Event/BAO/Participant.php @@ -106,6 +106,11 @@ class CRM_Event_BAO_Participant extends CRM_Event_DAO_Participant { $params['fee_amount'] = CRM_Utils_Rule::cleanMoney($params['fee_amount']); } + // ensure that role ids are encoded as a string + if (is_array($params['role_id'])) { + $params['role_id'] = implode(CRM_Core_DAO::VALUE_SEPARATOR, $params['role_id']); + } + $participantBAO = new CRM_Event_BAO_Participant; if (CRM_Utils_Array::value('id', $params)) { $participantBAO->id = CRM_Utils_Array::value('id', $params);