improve flawed test
[civicrm-core.git] / templates / CRM / Contact / Form / Search / Custom / FullText.tpl
index f2bcfdebb169d2202bd1ae94ce1d3bd9b8d8e21a..7c12f721ccdcce40a900006fc84764891c939450 100644 (file)
@@ -34,7 +34,8 @@
   {include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"}
 {/if}
 
-{assign var=table value=$form.table.value.0}
+{* @TODO: This is confusing - the variable `table` is already set and used above, and now we set it again to something that is technically different but has the same value, except on a blank form where it doesn't exist, but effectively then is the same value that it already has which is ''. So do we need this line even? *}
+{if (isset($form.table.value.0))}{assign var=table value=$form.table.value.0}{/if}
 {assign var=text  value=$form.text.value}
 {if !empty($summary.Contact) }
   <div class="section">