From 338ca8614337ce80e76db90a2973445c9018419e Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Mon, 19 Oct 2015 11:25:10 -0400 Subject: [PATCH] CRM-17419 fix exception error condition --- CRM/Contact/BAO/Relationship.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Contact/BAO/Relationship.php b/CRM/Contact/BAO/Relationship.php index 5e0c5739a8..c762b65dc8 100644 --- a/CRM/Contact/BAO/Relationship.php +++ b/CRM/Contact/BAO/Relationship.php @@ -944,7 +944,7 @@ WHERE relationship_type_id = " . CRM_Utils_Type::escape($type, 'Integer'); 'version' => 3, )); - if (is_array($result) && !empty($result['is_error']) && $result['error_message'] != 'Relationship already exists') { + if (is_array($result) && !empty($result['is_error']) && $result['error_message'] != 'Duplicate Relationship') { throw new CiviCRM_API3_Exception($result['error_message'], CRM_Utils_Array::value('error_code', $result, 'undefined'), $result); } -- 2.25.1