Skip to content

Commit

Permalink
fix errormessage in log for link in facet
Browse files Browse the repository at this point in the history
  • Loading branch information
BFallert committed Nov 8, 2024
1 parent f5fccff commit 20dff19
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 @@ -542,7 +542,7 @@ public function submit($start, $rows, $processResults = true)
$searchResult['metadata'][$indexName] = $doc['metadata'][$indexName];
}
}
if ($this->searchParams['fulltext'] == '1') {
if (array_key_exists('fulltext', $this->searchParams) && $this->searchParams['fulltext'] == '1') {
$searchResult['snippet'] = $doc['snippet'];
$searchResult['highlight'] = $doc['highlight'];
$searchResult['highlight_word'] = preg_replace('/^;|;$/', '', // remove ; at beginning or end
Expand Down Expand Up @@ -873,7 +873,7 @@ private function getDocument(Document $record, array $highlighting, array $field
*/
private function translateLanguageCode(&$doc): void
{
if (is_array($doc['metadata']) && array_key_exists('language', $doc['metadata'])) {
if (array_key_exists('metadata', $doc) && is_array($doc['metadata']) && array_key_exists('language', $doc['metadata'])) {
foreach($doc['metadata']['language'] as $indexName => $language) {
$doc['metadata']['language'][$indexName] = Helper::getLanguageName($language);
}
Expand Down

0 comments on commit 20dff19

Please sign in to comment.