CRM-15550 - Fix relationship id passed to postprocess hook
authorColeman Watts <coleman@civicrm.org>
Tue, 9 Dec 2014 19:22:00 +0000 (14:22 -0500)
committerColeman Watts <coleman@civicrm.org>
Tue, 9 Dec 2014 19:22:00 +0000 (14:22 -0500)
CRM/Contact/BAO/Relationship.php

index d5f0a02e03eb3df198ad88568bd7115aa63f96a5..15c4dc0d4a02492ed63b1c4f829abee876b7cc22 100644 (file)
@@ -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(