From 8ed6718db0c6bf86523c5091ac938a4388df33a0 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Tue, 25 Jan 2011 20:37:33 +0000 Subject: [PATCH] revert r80819 for now so we can use phpunit function foo (Title $title = null ) {} does not work --- includes/parser/Parser.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 5a8370802d..245aac5e6e 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -453,7 +453,7 @@ class Parser { * Expand templates and variables in the text, producing valid, static wikitext. * Also removes comments. */ - function preprocess( $text, Title $title, ParserOptions $options, $revid = null ) { + function preprocess( $text, $title, $options, $revid = null ) { wfProfileIn( __METHOD__ ); $this->startExternalParse( $title, $options, self::OT_PREPROCESS, true ); if ( $revid !== null ) { @@ -473,7 +473,7 @@ class Parser { * , etc. are parsed as for template transclusion, * comments, templates, arguments, tags hooks and parser functions are untouched. */ - public function getPreloadText( $text, Title $title, ParserOptions $options ) { + public function getPreloadText( $text, $title, $options ) { # Parser (re)initialisation $this->startExternalParse( $title, $options, self::OT_PLAIN, true ); @@ -4293,7 +4293,7 @@ class Parser { * Set up some variables which are usually set up in parse() * so that an external function can call some class members with confidence */ - public function startExternalParse( Title $title = null, ParserOptions $options, $outputType, $clearState = true ) { + public function startExternalParse( &$title, $options, $outputType, $clearState = true ) { $this->setTitle( $title ); $this->mOptions = $options; $this->setOutputType( $outputType ); @@ -5187,7 +5187,7 @@ class Parser { /** * strip/replaceVariables/unstrip for preprocessor regression testing */ - function testSrvus( $text, $title, ParserOptions $options, $outputType = self::OT_HTML ) { + function testSrvus( $text, $title, $options, $outputType = self::OT_HTML ) { if ( !$title instanceof Title ) { $title = Title::newFromText( $title ); } -- 2.20.1