Skip to content

Commit

Permalink
Fixed error on empty content field
Browse files Browse the repository at this point in the history
  • Loading branch information
Viburnum committed Jan 18, 2018
1 parent 2323e7a commit 0e2710d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Model/KnpResultSet.php
Expand Up @@ -74,6 +74,7 @@ public function getResults($offset = 0, $limit = null) {
public function getExcerpt(BaseDocument $document) {
$content = $document->getFieldValue(BaseDocument::FIELD_CONTENT);
$content = !is_array($content) ? $content : implode(' ', $content);
if($content === null) return null;
return Utils::highlight(Utils::excerpt($content, $this->term), $this->term);
}
}

0 comments on commit 0e2710d

Please sign in to comment.