From 004ed08d74a246271073bc51bcdca00136adc8fe Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 11 Mar 2008 19:09:26 +0000 Subject: [PATCH] Workaround for missing pages that get returned in search results (not-up-to-date index) --- includes/SpecialSearch.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/SpecialSearch.php b/includes/SpecialSearch.php index c8e6cd4744..be5165a880 100644 --- a/includes/SpecialSearch.php +++ b/includes/SpecialSearch.php @@ -381,6 +381,10 @@ class SpecialSearch { $fname = __METHOD__; $revision = Revision::newFromTitle( $t ); + if( !$revision ) { + return ''; + } + $text = $revision->getText(); $size = wfMsgExt( 'nbytes', array( 'parsemag', 'escape'), $wgLang->formatNum( strlen( $text ) ) ); -- 2.20.1