-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
Conversation
(Standard links)
|
@@ -229,7 +226,7 @@ public function browse() { | |||
); | |||
|
|||
// retrieve financial account name for the payment method page | |||
if ($gName = "payment_instrument") { | |||
if ($gName === "payment_instrument") { |
There was a problem hiding this comment.
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} </td> | |||
<td class="crm-admin-options-is_default" align="center">{if !empty($row.is_default)}{icon}{ts}Default{/ts}{/icon}{/if} </td> |
There was a problem hiding this comment.
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}
c322b1d
to
bd14fc4
Compare
Jenkins test this please |
Unrelated failure but still good to have a clean build :) |
Jenkins test this please |
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.