r38995 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38994‎ | r38995 | r38996 >
Date:13:31, 9 August 2008
Author:ialex
Status:old
Tags:
Comment:
For compatibility with PHP 5.3.0alpha1: specify class name instead of passing by ref the title object: was throwing the following error:
Warning: Parameter 2 to Parser::parse() expected to be a reference, value given in ./includes/StubObject.php on line 58
followed by:
Fatal error: Call to a member function getLanguageLinks() on a non-object in ./includes/OutputPage.php on line 463
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -279,15 +279,15 @@
280280 * Convert wikitext to HTML
281281 * Do not call this function recursively.
282282 *
283 - * @param string $text Text we want to parse
284 - * @param Title &$title A title object
285 - * @param array $options
286 - * @param boolean $linestart
287 - * @param boolean $clearState
288 - * @param int $revid number to pass in {{REVISIONID}}
 283+ * @param $text String: text we want to parse
 284+ * @param $title A title object
 285+ * @param $options ParserOptions
 286+ * @param $linestart boolean
 287+ * @param $clearState boolean
 288+ * @param $revid Int: number to pass in {{REVISIONID}}
289289 * @return ParserOutput a ParserOutput
290290 */
291 - public function parse( $text, &$title, $options, $linestart = true, $clearState = true, $revid = null ) {
 291+ public function parse( $text, Title $title, ParserOptions $options, $linestart = true, $clearState = true, $revid = null ) {
292292 /**
293293 * First pass--just handle <nowiki> sections, pass the rest off
294294 * to internalParse() which does all the real work.

Follow-up revisions

RevisionCommit summaryAuthorDate
r38999PHP 5.3.0alpha1 compatibility (same issue as r38995: E_WARNING: argument 3 ca...ialex14:11, 9 August 2008
r39000PHP 5.3.0alpha1 compatibility (same issue as r38995: E_WARNING: argument 2 ca...ialex14:33, 9 August 2008

Status & tagging log