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

PHP8: callback function on GOTV must be static #25200

Merged
merged 1 commit into from
Dec 19, 2022

Conversation

MegaphoneJon
Copy link
Contributor

Overview

The GOTV search page doesn't work, you get an error when you try to search.

Replication steps:

  • Enable CiviCampaign.
  • Create at least one Survey.
  • Go to Campaigns menu » GOTV (Voter Tracking).
  • Press Search.

Before

Endless spinning triangle, this error in the logs:

TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, non-static method CRM_Campaign_Page_AJAX::voterList() cannot be called statically in CRM_Utils_REST::process() (line 266 of /home/jon/local/civicrm-buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Utils/REST.php).

After

Works.

Technical Details

callback functions need to be declared as static.

@jmcclelland You probably are interested in this patch.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@civibot civibot bot added the master label Dec 19, 2022
@civibot
Copy link

civibot bot commented Dec 19, 2022

(Standard links)

@demeritcowboy demeritcowboy merged commit b80771f into civicrm:master Dec 19, 2022
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.

None yet

2 participants