diff --git a/api/v3/Profile.php b/api/v3/Profile.php index eb78e51e0dfe..f032335f039a 100644 --- a/api/v3/Profile.php +++ b/api/v3/Profile.php @@ -604,6 +604,7 @@ function _civicrm_api3_buildprofile_submitfields($profileID, $optionsBehaviour, */ } } + $profileFields[$profileID] = is_array($profileFields[$profileID]) ? $profileFields[$profileID] : []; uasort($profileFields[$profileID], "_civicrm_api3_order_by_weight"); return $profileFields[$profileID]; }