}
foreach (array(
'first_name', 'last_name') as $name) {
- if (!empty($$keys[$name]) &&
+ if (array_key_exists($name, $$keys) &&
CRM_Utils_Array::value('is_required', CRM_Utils_Array::value($name, $$keys))
) {
$$name = 1;
* @param $form
*/
public static function assignProfiles(&$form) {
- $addParticipantProfile = $form->get('addParticipantProfile');
- $primaryParticipantProfile = $form->get('primaryParticipantProfile');
- if (!empty($addParticipantProfile) || !empty($primaryParticipantProfile)) {
- $form->assign('addParticipantProfile', $addParticipantProfile);
- $form->assign('primaryParticipantProfile', $primaryParticipantProfile);
- return;
- }
-
$participantParams = $form->_params;
$formattedValues = $profileFields = array();
$count = 1;