Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.4.6
-
Component/s: Core CiviCRM
-
Labels:None
-
Documentation Required?:None
Description
hook_civicrm_post( $op, $objectName, $objectId, &$objectRef )
I've noticed that in the post hook, when the entity is a Relationship the $objectId parameter is NULL. When the entity is eg. a Contact, $objectId is correctly the entity ID.
There is an easy workaround for this- using $objectRef->id instead of $objectId.
It's possible that this issue is behind CRM-13306 (affecting 4.3.3).