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-compat] fix Upgrade call back issues by making functions static… #20503

Merged
merged 1 commit into from
Jun 4, 2021

Conversation

seamuslee001
Copy link
Contributor

… and also fixing an issue with an array key not existing when checking obsolete extensions

Overview

This fixes call backs in php8 in the upgrade process by making the functions static and also fixing this notice error

Undefined array key "com.klangsoft.flexiblejobs" Manager.php:385

Before

Upgrade Tests fail on php8

After

Upgrade tests work on php8

ping @eileenmcnaughton @totten @demeritcowboy

@civibot
Copy link

civibot bot commented Jun 4, 2021

(Standard links)

default:
throw new CRM_Extension_Exception("Cannot disable unknown extension: $key");
if (isset($origStatuses[$key])) {
switch ($origStatuses[$key]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the intent was to throw an exception if something's missing - if that's not desired, could it log something instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added in the Exception again for when it isn't set (which seems to be the case in the upgrades)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Looks good to me.

… and also fixing an issue with an array key not existing when checking obsolete extensions
@seamuslee001 seamuslee001 merged commit a9933c4 into civicrm:master Jun 4, 2021
@seamuslee001 seamuslee001 deleted the upgrade_fixes branch June 4, 2021 23:51
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