我对扩展FlaggedRevs有问题。尝试加载主页时,出现500 http错误。 我发现了错误日志: PHP致命错误:从/var/www/annagorlo/data/www/mybot.freedomain.thehost.com.ua/mediawiki-1.27.4/extensions/FlaggedRevs中的上下文“ FlaggableWikiPage”调用私有方法WikiPage :: convertSelectType() /backend/FlaggableWikiPage.php行391
功能出现错误:
public function loadPageData( $data = self::READ_NORMAL ) {
$this->mDataLoaded = true; // sanity
# Fetch data from DB as needed...
$from = WikiPage::convertSelectType( $data );
if ( $from === self::READ_NORMAL || $from === self::READ_LATEST ) {
$db = wfGetDB( $from === self::READ_LATEST ? DB_MASTER : DB_REPLICA );
$data = $this->pageDataFromTitle( $db, $this->mTitle );
}
# Load in primary page data...
parent::loadPageData( $data /* Row obj */ );
# Load in FlaggedRevs page data...
$this->stable = 0; // 0 => "found nothing"
$this->stableRev = null; // defer this one...
$this->revsArePending = false; // false => "found nothing" or "none pending"
$this->pendingRevCount = null; // defer this one...
$this->pageConfig = FRPageConfig::getDefaultVisibilitySettings(); // default
$this->syncedInTracking = true; // false => "unreviewed" or "synced"
# Load in flaggedrevs Row data if the page exists...(sanity check NS)
if ( $data && FlaggedRevs::inReviewNamespace( $this->mTitle ) ) {
if ( $data->fpc_override !== null ) { // page config row found
$this->pageConfig = FRPageConfig::getVisibilitySettingsFromRow( $data );
}
if ( $data->fp_stable !== null ) { // stable rev found
$this->stable = (int)$data->fp_stable;
$this->revsArePending = ( $data->fp_pending_since !== null ); // revs await review
$this->syncedInTracking = (bool)$data->fp_reviewed;
}
}
}
如何解决?