----------------------------------------
* CRM-13725: Make check for duplicate relationship aware of custom fields
https://issues.civicrm.org/jira/browse/CRM-13725
*/
private static function checkDuplicateCustomFields(&$params, $relationshipId) {
$existingValues = CRM_Core_BAO_CustomValueTable::getEntityValues($relationshipId, 'Relationship');
+ if (!array_key_exists('custom', $params)) {
+ return TRUE;
+ }
// iterate through $params['custom'], and check if the custom
// values are the same as the one of the existing relationship.
foreach ($params['custom'] as $group) {