1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

Fixed failing tests due to search highlighting changes

This commit is contained in:
Dan Brown
2021-11-13 13:43:41 +00:00
parent 2633b94deb
commit 221458ccfd
2 changed files with 9 additions and 4 deletions

View File

@ -223,7 +223,7 @@ class SearchIndex
if ($entity instanceof Page) {
$bodyTermsMap = $this->generateTermScoreMapFromHtml($entity->html);
} else {
$bodyTermsMap = $this->generateTermScoreMapFromText($entity->description, $entity->searchFactor);
$bodyTermsMap = $this->generateTermScoreMapFromText($entity->description ?? '', $entity->searchFactor);
}
$mergedScoreMap = $this->mergeTermScoreMaps($nameTermsMap, $bodyTermsMap, $tagTermsMap);