From 4dd83d9e29414bd15d82d79b9472659c56a2aabc Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 7 Jan 2022 09:54:31 +1300 Subject: [PATCH] Remove check for contact_check as it is always an array here --- CRM/Contact/BAO/Contact/Utils.php | 5 ----- CRM/Contact/BAO/Relationship.php | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CRM/Contact/BAO/Contact/Utils.php b/CRM/Contact/BAO/Contact/Utils.php index f5d05331e7..1e8e24b35c 100644 --- a/CRM/Contact/BAO/Contact/Utils.php +++ b/CRM/Contact/BAO/Contact/Utils.php @@ -332,11 +332,6 @@ WHERE id IN ( $idString ) $relationships = $relationshipIds = []; $ids = ['contact' => $contactID]; - // creating a new relationship - $dataExists = CRM_Contact_BAO_Relationship::dataExists($params); - if (!$dataExists) { - return [FALSE, TRUE, FALSE, FALSE, NULL]; - } $relationshipIds = []; foreach ($params['contact_check'] as $key => $value) { // check if the relationship is valid between contacts. diff --git a/CRM/Contact/BAO/Relationship.php b/CRM/Contact/BAO/Relationship.php index 418f2218c7..f7761b92e3 100644 --- a/CRM/Contact/BAO/Relationship.php +++ b/CRM/Contact/BAO/Relationship.php @@ -512,9 +512,11 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship { * * @param array $params * + * @deprecated * @return bool */ public static function dataExists($params) { + CRM_Core_Error::deprecatedFunctionWarning('obsolete'); return (isset($params['contact_check']) && is_array($params['contact_check'])); } -- 2.25.1