From dc9356633aa7442717c6d3c6131a841b3019d7e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuli=20Sillanp=C3=A4=C3=A4?= <samuli.sillanpaa@helsinki.fi> Date: Thu, 24 Oct 2019 10:03:25 -0400 Subject: [PATCH] Prevent notices. --- module/VuFind/src/VuFind/RecordDriver/HierarchyAwareTrait.php | 1 + themes/bootstrap3/templates/RecordTab/collectionlist.phtml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/VuFind/src/VuFind/RecordDriver/HierarchyAwareTrait.php b/module/VuFind/src/VuFind/RecordDriver/HierarchyAwareTrait.php index 2804c99cde6..b04387b817c 100644 --- a/module/VuFind/src/VuFind/RecordDriver/HierarchyAwareTrait.php +++ b/module/VuFind/src/VuFind/RecordDriver/HierarchyAwareTrait.php @@ -188,6 +188,7 @@ trait HierarchyAwareTrait case 'Top': return isset($this->fields['is_hierarchy_title']) && isset($this->fields['is_hierarchy_id']) + && isset($this->fields['hierarchy_top_id']) && in_array( $this->fields['is_hierarchy_id'], $this->fields['hierarchy_top_id'] diff --git a/themes/bootstrap3/templates/RecordTab/collectionlist.phtml b/themes/bootstrap3/templates/RecordTab/collectionlist.phtml index 3e66104a23e..f124aeb16e0 100644 --- a/themes/bootstrap3/templates/RecordTab/collectionlist.phtml +++ b/themes/bootstrap3/templates/RecordTab/collectionlist.phtml @@ -75,7 +75,7 @@ <?=$this->paginationControl($results->getPaginator(), 'Sliding', 'search/pagination.phtml', ['results' => $results])?> </form> <?php else: ?> - <h4><?=$this->transEsc($params->getDisplayQuery() || $filterCount > 0 ? 'nohit_heading' : 'collection_empty')?></h4> + <h4><?=$this->transEsc($params->getDisplayQuery() || ($filterCount ?? 0) > 0 ? 'nohit_heading' : 'collection_empty')?></h4> <div class="clearfix"> </div> <?php endif; ?> -- GitLab