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

Use getter function for entity id as on some forms is protected. #12127

Merged
merged 1 commit into from
May 15, 2018

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Use a getter function to access $this-_id as on some forms it is protected. Follow up to Follow up to #12095

Before

No change

After

no change

Technical Details

The affected function was extracted in #12095 & is only called from one place. This is a trivial tweak to it

Comments

@mattwire

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 @colemanw any chance one of your can merge this - it's a follow up from something v recently merged (per above)

@seamuslee001
Copy link
Contributor

@eileenmcnaughton what if a form doesn't define function getEntityId

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 it is a newly added function currently only called from one form - which is fixed to have that function in this PR

@seamuslee001
Copy link
Contributor

I'm satisfied that this is only affecting the only form that this function uses, however do you think we should do a if function_exists check at all and throw an exception if not to make sure no one adds to the form without adding the relevant function?

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 I think anyone adding it to a form & testing it would see the error pretty clearly!

@eileenmcnaughton
Copy link
Contributor Author

(ie. a hard fail would be better than a soft fail if they don't add the function)

@seamuslee001
Copy link
Contributor

(CiviCRM Review Template WORD-1.1)

@seamuslee001 seamuslee001 merged commit bcf8b46 into civicrm:master May 15, 2018
@eileenmcnaughton eileenmcnaughton deleted the cust_generic branch May 15, 2018 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants