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

Return success from cleanup job #24604

Merged
merged 1 commit into from
Sep 26, 2022

Conversation

braders
Copy link
Contributor

@braders braders commented Sep 24, 2022

Overview

Return success from cleanup job.

Before

The function civicrm_api3_job_cleanup had no return. This is very unusual for a API3 action, and is the first such example I have seen in core. All other actions that I have seen return civicrm_api3_create_success (unless there is an error).

After

The cleanup job returns an explicit success, consistent with other API3 actions.

Comments

The lack of return is currently causing a notice trying to access array offset on value of type null in JobManager.php whenever the cleanup is run via a scheduled job. This is because JobManager.php always expects the standard success or error array to be returned from an API3 action.

@civibot civibot bot added the master label Sep 24, 2022
@civibot
Copy link

civibot bot commented Sep 24, 2022

(Standard links)

@eileenmcnaughton
Copy link
Contributor

thanks @braders - selfishly I'm pleased your summer is over :-) Appreciate the patches

@eileenmcnaughton eileenmcnaughton merged commit 2ad3657 into civicrm:master Sep 26, 2022
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.

2 participants