if ( $nt ) {
$this->id = $id;
// is_string() check is back-compat for ApprovedRevs
- if( is_string( $c ) ) {
+ if ( is_string( $c ) ) {
$this->content = new TextContent( $c );
} else {
$this->content = $c ?: false;
wfProfileIn( __METHOD__ );
- $page = WikiPage::newFromId( $this->id );
+ $page = WikiPage::newFromId( $this->id, WikiPage::READ_LATEST );
$indexTitle = Title::indexTitle( $this->title->getNamespace(), $this->title->getText() );
foreach ( SearchEngine::getSearchTypes() as $type ) {