https://bugzilla.wikimedia.org/show_bug.cgi?id=23307

--- Comment #6 from Bryan Tong Minh <bryan.tongm...@gmail.com> 2010-11-06 
14:23:51 UTC ---
I was looking into this, and it appears that the main culprit is wfMsgExt(
$msg, 'parsemag' ), which calls MessageCache::transform and in turn
Parser::transformMsg. The way to fix this is to pass a $title object along the
entire wfMsg chain. 

I used the following code to find out what is calling $wgTitle:

class wgTitleStub extends StubObject {
    function __construct( $title ) {
        $this->title = $title;
        parent::__construct( 'wgTitle' );
    }
    function _newObject() {
        return $this->title;
    }
    function _unstub( $name = '_unstub', $level = 2 ) {
        parent::_unstub( $name, $level );

        $bt = array();
        foreach ( wfDebugBacktrace() as $line ) {
            if ( isset( $line['class'] ) ) {
                $bt[] = "{$line['class']}::{$line['function']}";
            } else {
                $bt[] = $line['function'];
            }
        }
        wfDebug('Full $wgTitle unstub backtrace: ' . implode( ', ', $bt ) .
"\n" );
    }
}

Then in Wiki::performRequestForTitle() remove the pass by reference from the
function arguments and set $GLOBALS['wgTitle'] = new wgTitleStub( $title );

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to