Another array_key_exists check for notice purposes
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 29 Jan 2023 00:26:34 +0000 (13:26 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 29 Jan 2023 00:26:34 +0000 (13:26 +1300)
templates/CRM/Report/Form/Tabs/Filters.tpl

index df96a38ff9e4817ee83451e942764a822f6e5dca..e2f25de8b1252d16b029a1172690570648c01111 100644 (file)
                       {include file="CRM/Core/DatePickerRangeWrapper.tpl" fieldName=$fieldName hideRelativeLabel=1 from='_from' to='_to' class='' colspan=''}
                   </tr>
                 {elseif $form.$fieldOp.html}
-                  <tr class="report-contents crm-report crm-report-criteria-filter crm-report-criteria-filter-{$tableName}" {if array_key_exists('no_display', $field) && !empty($field.no_display)} style="display: none;"{/if}>
+                  <tr class="report-contents crm-report crm-report-criteria-filter crm-report-criteria-filter-{$tableName}" {if array_key_exists('no_display', $field) && $field.no_display} style="display: none;"{/if}>
                     <td class="label report-contents">{if !empty($field.title)}{$field.title}{/if}</td>
                     <td class="report-contents">{$form.$fieldOp.html}</td>
                     <td>
                       <span id="{$filterVal}_cell">{$form.$filterVal.label}&nbsp;{$form.$filterVal.html}</span>
                       <span id="{$filterMin}_max_cell">
-                        {if !empty($form.$filterMin)}{$form.$filterMin.label}&nbsp;{$form.$filterMin.html}&nbsp;&nbsp;{/if}
-                        {if !empty($form.$filterMax)}{$form.$filterMax.label}&nbsp;{$form.$filterMax.html}{/if}
+                        {if array_key_exists($filterMin, $form) && $form.$filterMin}{$form.$filterMin.label}&nbsp;{$form.$filterMin.html}&nbsp;&nbsp;{/if}
+                        {if array_key_exists($filterMax, $form) && $form.$filterMax}{$form.$filterMax.label}&nbsp;{$form.$filterMax.html}{/if}
                       </span>
                     </td>
                   </tr>