Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix backward-compatability for new method in CRM_Contact_BAO_Query_Hook #22933

Merged
merged 1 commit into from
Mar 13, 2022

Conversation

colemanw
Copy link
Member

Overview

The method getDefaultReturnProperties was just added to CRM_Contact_BAO_Query_Hook, but some extensions do not yet implement it, and also do not extend that class so cannot inherit the default method.

This adds a guard around calling the new method to avoid crashes.

See discussion in #22064 (comment)

@civibot
Copy link

civibot bot commented Mar 13, 2022

(Standard links)

@demeritcowboy
Copy link
Contributor

Should this be against 5.48?

@colemanw colemanw changed the base branch from master to 5.48 March 13, 2022 14:29
@civibot civibot bot added 5.48 and removed master labels Mar 13, 2022
@colemanw
Copy link
Member Author

Yes, whoops that's what I meant. And then we can backport it to 5.47.
The new method only affects CiviGrant extension.

The method getDefaultReturnProperties was just added to CRM_Contact_BAO_Query_Hook,
but some extensions do not yet implement it, and also do not extend that class so
cannot inherit the default method.

This adds a guard around calling the new method to avoid crashes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants