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 notice on 'Manage Contribution Pages' screen #22661

Merged
merged 1 commit into from
Jan 29, 2022

Conversation

braders
Copy link
Contributor

@braders braders commented Jan 29, 2022

Overview

Avoid PHP notice on 'Manage Contribution Pages' screen.

Before

If no contribution pages exist, the notice Undefined index: rows occured. As shown in a WordPress environment, with query monitor catching and showing notices:

Screenshot 2022-01-29 at 15 55 13

After

The rows smarty variable is always defined, defaulting to am empty array if no PCPs exist. As such the PHP notice has gone.

Additionally the variable $contribution has been pluralised for better readability.

@civibot
Copy link

civibot bot commented Jan 29, 2022

(Standard links)

@civibot civibot bot added the master label Jan 29, 2022
@colemanw
Copy link
Member

Makes sense.

@colemanw colemanw merged commit 1d64916 into civicrm:master Jan 29, 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.

2 participants