Skip to content

Commit

Permalink
Fix condition check for non existent query key
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrycze-volk committed Jun 6, 2024
1 parent 474479b commit 5722002
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Common/Solr/SolrSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 5722002

Please sign in to comment.