r85999 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85998‎ | r85999 | r86000 >
Date:22:58, 13 April 2011
Author:brion
Status:ok
Tags:
Comment:
Use type hinting on CentralAuthUser::getInstance()'s user parameter. Makes it a little easier to track down things that pass bogus data in, such as the bad code in r82120 (reverted in r85997).
Modified paths:
  • /trunk/extensions/CentralAuth/CentralAuthUser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/CentralAuthUser.php
@@ -54,7 +54,7 @@
5555 * cache it in the User object.
5656 * @param User $user
5757 */
58 - static function getInstance( $user ) {
 58+ static function getInstance( User $user ) {
5959 if ( !isset( $user->centralAuthObj ) ) {
6060 $user->centralAuthObj = new self( $user->getName() );
6161 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82120Add a link to Special:CentralAuth/username on the Special:Contributions tool ...raymond17:59, 14 February 2011
r85997Revert r82120: untested code causes fatal error on Special:Contributions when...brion22:57, 13 April 2011

Status & tagging log