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

PHP notice fixes on options page #20816

Merged
merged 1 commit into from
Jul 9, 2021
Merged

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Jul 9, 2021

Overview

Fixes php notices, short array syntax, and a bug-begging typo on the Options listing page.

Before

Go to e.g. "Website Types".
Notice the notices.

After

No notices to notice.

@civibot
Copy link

civibot bot commented Jul 9, 2021

(Standard links)

@civibot civibot bot added the master label Jul 9, 2021
@@ -229,7 +226,7 @@ public function browse() {
);

// retrieve financial account name for the payment method page
if ($gName = "payment_instrument") {
if ($gName === "payment_instrument") {
Copy link
Member Author

Choose a reason for hiding this comment

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

Yikes. This was a typo that caused the condition to always be true!

@@ -137,7 +137,7 @@
<td class="crm-admin-options-description crm-editable" data-field="description" data-type="textarea">{if isset($row.description)}{$row.description}{/if}</td>
<td class="nowrap crm-admin-options-order">{if isset($row.weight)}{$row.weight}{/if}</td>
{if !empty($showIsDefault)}
<td class="crm-admin-options-is_default" align="center">{icon condition=$row.is_default}{ts}Default{/ts}{/icon}&nbsp;</td>
<td class="crm-admin-options-is_default" align="center">{if !empty($row.is_default)}{icon}{ts}Default{/ts}{/icon}{/if}&nbsp;</td>
Copy link
Member Author

Choose a reason for hiding this comment

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

The condition=$row.is_default caused notices, and it's the same as surrounding the whole block in {if}

@monishdeb
Copy link
Member

Jenkins test this please

@monishdeb
Copy link
Member

Unrelated failure but still good to have a clean build :)

@seamuslee001
Copy link
Contributor

Jenkins test this please

@colemanw colemanw merged commit 66fdb30 into civicrm:master Jul 9, 2021
@seamuslee001 seamuslee001 deleted the optionsPageFixes branch July 12, 2021 03:57
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.

3 participants