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

Remove unnecessary count() from smarty conditionals #26070

Merged
merged 1 commit into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/CRM/Form/body.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div>{$form.hidden}</div>
{/if}

{if ($snippet !== 'json') and !$suppressForm and $form.errors !== NULL && count($form.errors) gt 0}
{if ($snippet !== 'json') and !$suppressForm and $form.errors}
<div class="messages crm-error">
<i class="crm-i fa-exclamation-triangle crm-i-red" aria-hidden="true"></i>
{ts}Please correct the following errors in the form fields below:{/ts}
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/common/SectionNav.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
+--------------------------------------------------------------------+
*}
{* Navigation template for multi-section Wizards *}
{if count( $category.steps ) > 0}
{if $category.steps}
<div id="wizard-steps">
<ul class="section-list">
{foreach from=$category.steps item=step}
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/common/displaySearchCriteria.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{foreach from=$qill name=sets key=setKey item=orClauses}
{if $smarty.foreach.sets.total > 2}
{* We have multiple criteria sets, so display AND'd items in each set on the same line. *}
{if count($orClauses) gt 0}
{if $orClauses}
<ul>
<li>
{foreach from=$orClauses name=criteria item=item}
Expand Down