I'm working through the errors I'm getting with the latest version of
the StableVersion extension from Subversion, I'm sorted a couple but
have lost the plot with this one:-
Object of class ParserOutput could not be converted to string in
*\includes\Parser.php* on line *2779*
Line 2779 is :
function replaceVariables( $text, $args = array(), $argsOnly = false ) {
# Prevent too big inclusions
2779: if( strlen( $text ) > $this->mOptions->getMaxIncludeSize() ) {
return $text;
}
And this (line 387) is only one place in in the StableVersions.php that
calls replaceVariables()
function getCacheText( &$article ) {
global $wgStableVersionCaching, $wgUser;
$title = $article->getTitle();
$article->loadContent( true ); # FIXME: Do we need the "true"
here? For what? Safe redirects??
$text = $article->mContent;
$p = new Parser();
$p->disableCache();
$wgStableVersionCaching = true;
$parserOptions = ParserOptions::newFromUser( $wgUser ); # Dummy
$text = $p->parse( $text, $title, $parserOptions );
$stripState = $p->mStripState;
$wgStableVersionCaching = false;
387 $text = $p->replaceVariables( $text, $parserOptions );
$this->fixNoWiki( $stripState );
$p->mStripState = $stripState;
$text = $p->unstrip( $text, $p->mStripState );
$text = $p->unstripNoWiki( $text, $p->mStripState );
return $text;
Any suggestions would be appreciated.
Thanks
John