Skip to content

Commit

Permalink
[BUGFIX] Fix condition check for non existent query key (kitodo#1253)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Meyer <[email protected]>
  • Loading branch information
beatrycze-volk and sebastian-meyer authored Jun 6, 2024
1 parent 780a9a5 commit 564bfd4
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 564bfd4

Please sign in to comment.