From 9b203029409331bd5af264aa51f6c865fd6e5cd3 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Wed, 21 May 2014 08:59:27 -0400
Subject: [PATCH] Avoid notice.

---
 themes/blueprint/templates/search/searchbox.phtml | 4 ++--
 themes/bootstrap/templates/search/searchbox.phtml | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/themes/blueprint/templates/search/searchbox.phtml b/themes/blueprint/templates/search/searchbox.phtml
index 53dcc0215bc..212ef848fdb 100644
--- a/themes/blueprint/templates/search/searchbox.phtml
+++ b/themes/blueprint/templates/search/searchbox.phtml
@@ -77,7 +77,7 @@
             isset($this->checkboxFilters) && is_array($this->checkboxFilters) ? $this->checkboxFilters : array()
         );
       ?>
-      <? if ($hasDefaultsApplied || !empty($filterDetails)): ?>
+      <? if ((isset($hasDefaultsApplied) && $hasDefaultsApplied) || !empty($filterDetails)): ?>
         <? $defaultFilterState = $options->getRetainFilterSetting() ? ' checked="checked"' : ''; ?>
         <div class="keepFilters">
           <input type="checkbox"<?=$defaultFilterState?> id="searchFormKeepFilters"/> <label for="searchFormKeepFilters"><?=$this->transEsc("basic_search_keep_filters")?></label>
@@ -86,7 +86,7 @@
               <input id="<?=$this->escapeHtml($current['id'])?>" type="checkbox"<?=$defaultFilterState?> name="filter[]" value="<?=$this->escapeHtml($current['value'])?>" />
               <label for="<?=$this->escapeHtml($current['id'])?>"><?=$this->escapeHtml($current['value'])?></label>
             <? endforeach; ?>
-            <? if ($hasDefaultsApplied): ?>
+            <? if (isset($hasDefaultsApplied) && $hasDefaultsApplied): ?>
               <!-- this is a hidden element that flags whether or not default filters have been applied;
                    it is intentionally unlabeled, as users are not meant to manipulate it directly. -->
               <input id="dfApplied" type="checkbox" name="dfApplied" value="1" />
diff --git a/themes/bootstrap/templates/search/searchbox.phtml b/themes/bootstrap/templates/search/searchbox.phtml
index 10f244b85c3..917727d6396 100644
--- a/themes/bootstrap/templates/search/searchbox.phtml
+++ b/themes/bootstrap/templates/search/searchbox.phtml
@@ -69,7 +69,7 @@
             isset($this->checkboxFilters) && is_array($this->checkboxFilters) ? $this->checkboxFilters : array()
         );
       ?>
-      <? if ($hasDefaultsApplied || !empty($filterDetails)): ?>
+      <? if ((isset($hasDefaultsApplied) && $hasDefaultsApplied) || !empty($filterDetails)): ?>
         <? $defaultFilterState = $options->getRetainFilterSetting() ? ' checked="checked"' : ''; ?>
         <label class="checkbox">
           <input onChange="$('.applied-filter').click()" type="checkbox"<?=$defaultFilterState?> id="searchFormKeepFilters"/>
@@ -80,7 +80,7 @@
             <input class="applied-filter" id="<?=$this->escapeHtml($current['id'])?>" type="checkbox"<?=$defaultFilterState?> name="filter[]" value="<?=$this->escapeHtml($current['value'])?>" />
             <label for="<?=$this->escapeHtml($current['id'])?>"><?=$this->escapeHtml($current['value'])?></label>
           <? endforeach; ?>
-          <? if ($hasDefaultsApplied): ?>
+          <? if (isset($hasDefaultsApplied) && $hasDefaultsApplied): ?>
             <!-- this is a hidden element that flags whether or not default filters have been applied;
                  it is intentionally unlabeled, as users are not meant to manipulate it directly. -->
             <input class="applied-filter" id="dfApplied" type="checkbox" name="dfApplied" value="1" />
-- 
GitLab