Issue:DPLMain calls private Title function prefix()

From FollowTheScore
Revision as of 22:14, 19 December 2011 by Maiden taiwan (talk | contribs) (Created page with "{{Issue |Type = Bug |Extension = DPL |Version = 2.0 |Description = DPLMain calls Title::prefix which is private as of MediaWiki 1.18.0 |Status = open }} =...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Description: DPLMain calls Title::prefix which is private as of MediaWiki 1.18.0
Extension / Version: DPL   /   2.0
Type / Status: Bug   /   open

Problem

This fatal error in DPL 2.0 and MediaWiki 1.18.0:

PHP Fatal error:  Call to private method Title::prefix()
from context 'DPLMain' in /var/www/html/w/extensions/DynamicPageList/DPLMain.php on line 2631

is caused by this line of code:

 if ($bShowNamespace) $sTitleText = str_replace( '_', ' ', $title->prefix($sTitleText) );

because the Title::prefix() method is now private. I suspect you should be calling Title::getPrefixedDBkey() if you want underscores, or Title::getPrefixedText if you want space characters.

Reply