From 5c208c3fcb8d15d41e489847d5a3ab3afeec0965 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 9 Dec 2014 14:22:00 -0500 Subject: [PATCH] CRM-15550 - Fix relationship id passed to postprocess hook --- CRM/Contact/BAO/Relationship.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/BAO/Relationship.php b/CRM/Contact/BAO/Relationship.php index d5f0a02e03..15c4dc0d4a 100644 --- a/CRM/Contact/BAO/Relationship.php +++ b/CRM/Contact/BAO/Relationship.php @@ -261,7 +261,7 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship { $relationship->free(); - CRM_Utils_Hook::post($hook, 'Relationship', $relationshipId, $relationship); + CRM_Utils_Hook::post($hook, 'Relationship', $relationship->id, $relationship); return $relationship; } @@ -491,7 +491,7 @@ class CRM_Contact_BAO_Relationship extends CRM_Contact_DAO_Relationship { $relationship->delete(); CRM_Core_Session::setStatus(ts('Selected relationship has been deleted successfully.'), ts('Record Deleted'), 'success'); - CRM_Utils_Hook::post('delete', 'Relationship', $relationship->id, $relationship); + CRM_Utils_Hook::post('delete', 'Relationship', $id, $relationship); // delete the recently created Relationship $relationshipRecent = array( -- 2.25.1