Details
-
Type:
Bug
-
Status: Done/Fixed
-
Priority:
Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6
-
Fix Version/s: 4.6.3
-
Component/s: None
-
Labels:None
-
Documentation Required?:Developer Doc
Description
The post hook signature handles the created object but the line item api passes the params array ie
CRM_Utils_Hook::post('create', 'LineItem', $params['entity_id'], $params);
should be
CRM_Utils_Hook::post('create', 'LineItem', $params['entity_id'], $lineItemBAO)
Note that the entity_id is ALSO not correct - it should be line_item id - not sure whether to fix this too...
Hi Joe
I want to run this by you before I change this (& document in http://wiki.civicrm.org/confluence/display/CRMDOC/API+changes#APIchanges-Hooks)
Basically the post hook passes the bao of the save entity and the id of the saved entity.
Line item BAO passes the $params array (not object) and the entity_id (participant, membership or contribution associated) instead.
This really should be fixed and not having done it in time for 4.6, doing it for 4.6.1 is the next best thing - but do you have any reason to think it's in much use / we need to take more caution than just updating the change log?