X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FProfile.php;h=4b7c479b2ba08da7c639b46737101fbfe55b618f;hb=3e1fa095d7d3c43ef950f389034e600e8e861ff3;hp=099aa01ac1ff385c84b066dad598dbb09e6de7a7;hpb=dd91a3317ce2142e7f12353cc451fdac2b690ddc;p=civicrm-core.git diff --git a/api/v3/Profile.php b/api/v3/Profile.php index 099aa01ac1..4b7c479b2b 100644 --- a/api/v3/Profile.php +++ b/api/v3/Profile.php @@ -580,8 +580,10 @@ function _civicrm_api3_buildprofile_submitfields($profileID, $optionsBehaviour = if(isset($profileFields[$profileID][$entityfield])) { unset($profileFields[$profileID][$entityfield]); } - // we will make the mixed case version (e.g. of 'Primary') an alias - $profileFields[$profileID][$fieldName]['api.aliases'][] = $entityfield; + if(!in_array($entityfield, $profileFields[$profileID][$fieldName]['api.aliases'])) { + // we will make the mixed case version (e.g. of 'Primary') an alias + $profileFields[$profileID][$fieldName]['api.aliases'][] = $entityfield; + } } /** * putting this on hold -this would cause the api to set the default - but could have unexpected behaviour