From: Brion Vibber Date: Tue, 11 Mar 2008 19:09:26 +0000 (+0000) Subject: Workaround for missing pages that get returned in search results (not-up-to-date... X-Git-Tag: 1.31.0-rc.0~49166 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=004ed08d74a246271073bc51bcdca00136adc8fe;p=lhc%2Fweb%2Fwiklou.git Workaround for missing pages that get returned in search results (not-up-to-date index) --- 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 ) ) );