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

CRM_Mailing_Form_Optout, CRM_Mailing_Form_Unsubscribe: change properties to protected from private #26713

Merged

Conversation

semseysandor
Copy link
Contributor

Overview

I'd like to hook into the Opt-out and Unsubscribe process but job_id, queue_id and hash are declared private so they are not accessible.

Before

CRM_Core_Form::getVar('_job_id') returns null

After

CRM_Core_Form::getVar('_job_id') returns correct Job ID.

Technical Details

They were declared with private visibility in #21350. Before that they were undefined properties so changing visibility to protected shouldn't break any encapsulation as originally there were public. I think private here is just too strict.

@civibot
Copy link

civibot bot commented Jul 3, 2023

(Standard links)

@colemanw
Copy link
Member

colemanw commented Jul 3, 2023

Makes sense!

@colemanw colemanw merged commit e17ce06 into civicrm:master Jul 3, 2023
@semseysandor semseysandor deleted the unsubscribe-properties branch July 3, 2023 19:28
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