Report tpl enotice fix
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 29 Jan 2023 00:09:22 +0000 (13:09 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 29 Jan 2023 00:09:22 +0000 (13:09 +1300)
templates/CRM/Report/Form/Tabs/ReportOptions.tpl

index 5788f33362e0412d5f39aff638cd363eba1564d8..4306302292b6d173a21473e93dbf12b95f57a9c5 100644 (file)
       {assign var="optionCount" value=0}
       <tr class="crm-report crm-report-criteria-field">
         {foreach from=$otherOptions item=optionField key=optionName}
-        {assign var="optionCount" value=`$optionCount+1`}
-        <td>{if $form.$optionName.label}{$form.$optionName.label}&nbsp;{/if}{$form.$optionName.html}</td>
-        {if $optionCount is div by 2}
-      </tr><tr class="crm-report crm-report-criteria-field">
+        {if array_key_exists($optionName, $form)}
+          {assign var="optionCount" value=`$optionCount+1`}
+          <td>{if $form.$optionName.label}{$form.$optionName.label}&nbsp;{/if}{$form.$optionName.html}</td>
+          {if $optionCount is div by 2}
+        </tr><tr class="crm-report crm-report-criteria-field">
+          {/if}
         {/if}
         {/foreach}
         {if $optionCount is not div by 2}