r98599 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98598‎ | r98599 | r98600 >
Date:02:04, 1 October 2011
Author:brion
Status:ok
Tags:
Comment:
MFT r98598: PHP 5.2 compat fix in SpecialPage (bug 31289)
Modified paths:
  • /branches/REL1_18/phase3/includes/SpecialPage.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/includes/SpecialPage.php
@@ -694,7 +694,12 @@
695695 * @see wfMessage
696696 */
697697 public function msg( /* $args */ ) {
698 - return call_user_func_array( array( $this->getContext(), 'msg' ), func_get_args() );
 698+ // Note: can't use func_get_args() directly as second or later item in
 699+ // a parameter list until PHP 5.3 or you get a fatal error.
 700+ // Works fine as the first parameter, which appears elsewhere in the
 701+ // code base. Sighhhh.
 702+ $args = func_get_args();
 703+ return call_user_func_array( array( $this->getContext(), 'msg' ), $args );
699704 }
700705
701706 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98598* (bug 31289) Fix fatal error on special pages using $this->msg() on PHP 5.2...brion02:03, 1 October 2011

Status & tagging log