From 564bfd47a8dbbecf73ba7cdb0d834d4c79adf3e0 Mon Sep 17 00:00:00 2001 From: Beatrycze Volk Date: Thu, 6 Jun 2024 19:00:56 +0200 Subject: [PATCH] [BUGFIX] Fix condition check for non existent `query` key (#1253) Co-authored-by: Sebastian Meyer --- Classes/Common/Solr/SolrSearch.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Common/Solr/SolrSearch.php b/Classes/Common/Solr/SolrSearch.php index d281efbcd..f991f9ca4 100644 --- a/Classes/Common/Solr/SolrSearch.php +++ b/Classes/Common/Solr/SolrSearch.php @@ -365,8 +365,8 @@ public function prepare() // Set search query. if ( - (!empty($this->searchParams['fulltext'])) - || preg_match('/' . $fields['fulltext'] . ':\((.*)\)/', trim($this->searchParams['query']), $matches) + !empty($this->searchParams['fulltext']) + || preg_match('/' . $fields['fulltext'] . ':\((.*)\)/', trim($this->searchParams['query'] ?? ''), $matches) ) { // If the query already is a fulltext query e.g using the facets $this->searchParams['query'] = empty($matches[1]) ? $this->searchParams['query'] : $matches[1];