Merge pull request #15338 from totten/master-poc-postcommit
[civicrm-core.git] / api / v3 / Profile.php
index 1f12a073223bb7abac2583e88961a55dc0e5a6a4..17463bb1a3a003cd5446567da43ca658b0bc71d7 100644 (file)
@@ -515,10 +515,10 @@ function _civicrm_api3_buildprofile_submitfields($profileID, $optionsBehaviour =
     $profileFields[$profileID][$fieldName] = array_merge([
       'api.required' => $field['is_required'],
       'title' => $field['label'],
-      'help_pre' => CRM_Utils_Array::value('help_pre', $field),
-      'help_post' => CRM_Utils_Array::value('help_post', $field),
+      'help_pre' => $field['help_pre'] ?? NULL,
+      'help_post' => $field['help_post'] ?? NULL,
       'entity' => $entity,
-      'weight' => CRM_Utils_Array::value('weight', $field),
+      'weight' => $field['weight'] ?? NULL,
     ], $aliasArray);
 
     $ufFieldTaleFieldName = $field['field_name'];