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

Avoid PHP undefined index notices on extension pages #22848

Merged
merged 1 commit into from
Feb 27, 2022

Conversation

braders
Copy link
Contributor

@braders braders commented Feb 27, 2022

Overview

On the extensions page (/civicrm/admin/extensions) various notices (undefined index) are thrown if the extension info.xml files are missing one or more keys. This adds a helper method to set relevant defaults for use in the twig files.

This also removes use of empty() in the templates/CRM/Admin/Page/ExtensionDetails.tpl template which is problematic with the new CIVICRM_SMARTY_DEFAULT_ESCAPE.

Before

Many PHP notices occur on the extension manager page:

Screenshot 2022-02-27 at 17 16 32

After

The bulk of these notices are removed (a Undefined index: tabHeader still occurs, but this is a problem common to many other pages).

@civibot
Copy link

civibot bot commented Feb 27, 2022

(Standard links)

@civibot civibot bot added the master label Feb 27, 2022
@eileenmcnaughton
Copy link
Contributor

thanks @braders

@eileenmcnaughton eileenmcnaughton merged commit 4c79f03 into civicrm:master Feb 27, 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