Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.4.7
-
Fix Version/s: 3.4.8
-
Component/s: CiviCRM API
-
Labels:None
Description
civicrm_api3_custom_value_create calls CRM_Core_BAO_CustomField::getCustomFieldID($i, $n) to get custom field ID (line 92).
$i - supposed to be group name
$n - field name
getCustomFieldID accepts parameters in this order: $fieldName, $groupName.
Solution - call the method with parementers with reversed order:
// Lookup names if ID was not supplied
$key = CRM_Core_BAO_CustomField::getCustomFieldID($n, $i);