From 8c87816070b7dc699d170c4847736d0b56f4f58d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 9 Jan 2023 16:15:36 +0100 Subject: [PATCH] check if $record_type is set --- views/bootstrap/class.Search.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 92e5d5e5b..43e8992f1 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -834,8 +834,8 @@ function typeahead() { /* {{{ */ } if(!isset($facets['record_type'])) { $options = array(); - $options[] = array('document', getMLText('document'), in_array('document', $record_type)); - $options[] = array('folder', getMLText('folder'), in_array('folder', $record_type)); + $options[] = array('document', getMLText('document'), $record_type && in_array('document', $record_type)); + $options[] = array('folder', getMLText('folder'), $record_type && in_array('folder', $record_type)); $this->formField( getMLText("record_type"), array(