Merge "Add instrumentation to Special:Mute"
[lhc/web/wiklou.git] / includes / search / SearchResult.php
index 1d71c87..b924b29 100644 (file)
@@ -138,8 +138,8 @@ class SearchResult {
        protected function initText() {
                if ( !isset( $this->mText ) ) {
                        if ( $this->mRevision != null ) {
-                               $this->mText = $this->searchEngine->getTextFromContent(
-                                               $this->mTitle, $this->mRevision->getContent() );
+                               $content = $this->mRevision->getContent();
+                               $this->mText = $content !== null ? $content->getTextForSearchIndex() : '';
                        } else { // TODO: can we fetch raw wikitext for commons images?
                                $this->mText = '';
                        }