From 9fea3cbac0f9195e13df1d5c14214fb2f7638eb5 Mon Sep 17 00:00:00 2001 From: Alexander Blanchard Date: Tue, 4 Jun 2024 18:00:05 +0100 Subject: [PATCH] fix: add check to prevent undefined index error --- code/web/sys/SearchObject/SummonSearcher.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/web/sys/SearchObject/SummonSearcher.php b/code/web/sys/SearchObject/SummonSearcher.php index cc12ca2d04..ee8dc6d44a 100644 --- a/code/web/sys/SearchObject/SummonSearcher.php +++ b/code/web/sys/SearchObject/SummonSearcher.php @@ -517,10 +517,12 @@ public function getLimitList() { foreach($limitOption['counts'] as $value){ if ($value['value'] == 'true') { + $isApplied = isset($this->limiters[$limitId]) && $this->limiters[$limitId] == 'y' ? 1 : 0; + $availableLimits[$limitId] = [ 'display' => $displayName, 'value' => $limitId, - 'isApplied' => ($this->limiters[$limitId]) == 'y' ? 1 : 0, + 'isApplied' => $isApplied, 'url' => $this->renderLinkWithLimiter($limitId), 'removalUrl' => $this->renderLinkWithoutLimiter($limitId), ];