diff --git a/themes/blueprint/templates/search/searchbox.phtml b/themes/blueprint/templates/search/searchbox.phtml
index 53dcc0215bcc58ddcd99e2d37a55f431107cda80..212ef848fdb9504a2cc22e169b07fcb1e7b95a58 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 10f244b85c327d42be746d7b9a08a51fc2bbacbd..917727d6396cc6997039e9519f139b85d103d0d9 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" />