futurefirst / uk.org.futurefirst.networks.civipoints

An extension for CiviCRM. Allows points to be allocated to contacts.
Other
1 stars 6 forks source link

Incompatible with 4.6 due to civicrm_points_sum hook #1

Closed davidknoll closed 9 years ago

davidknoll commented 9 years ago

There is a change in CRM_Utils_Hook::invoke from 4.4 to 4.5, from 5 to 6 parameters to be passed through to the hook function. This means when the custom hook invocation in CRM_Points_BAO_Points uses the 4.4 function signature, the hook suffix is passed where the 4.5/4.6 version of CRM_Utils_Hook expects the 6th parameter to the hook to be. This causes a whitescreen.

Need to check the Civi version in use and send the appropriate number of parameters?

JohnFF commented 9 years ago

I'd be tempted to try to default the parameter, or even use an enclosure (PHP nameless function) if possible.

On Sun, October 11, 2015 10:23 am, David Knoll wrote:

There is a change in CRM_Utils_Hook::invoke from 4.4 to 4.5, from 5 to 6 parameters to be passed through to the hook function. This means when the custom hook invocation in CRM_Points_BAO_Points uses the 4.4 function signature, the hook suffix is passed where the 4.5/4.6 version of CRM_Utils_Hook expects the 6th parameter to the hook to be. This causes a whitescreen.

Need to check the Civi version in use and send the appropriate number of parameters?


Reply to this email directly or view it on GitHub: https://github.com/futurefirst/uk.org.futurefirst.networks.civipoints/issu es/1

davidknoll commented 9 years ago

Fixed with e92ab4d, which checks the Civi version and calls CRM_Utils_Hook::invoke with the right number of parameters.