r97986 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97985‎ | r97986 | r97987 >
Date:07:25, 24 September 2011
Author:aaron
Status:deferred
Tags:
Comment:
Fixed fatal due to boolean passed in as $user to checkIfAccountNameIsPending()
Modified paths:
  • /trunk/extensions/ConfirmAccount/presentation/ConfirmAccountUI.hooks.php (modified) (history)
  • /trunk/extensions/ConfirmAccount/presentation/specialpages/actions/RequestAccount_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmAccount/presentation/ConfirmAccountUI.hooks.php
@@ -22,7 +22,7 @@
2323 return true;
2424 }
2525
26 - public static function checkIfAccountNameIsPending( $user, &$abortError ) {
 26+ public static function checkIfAccountNameIsPending( User $user, &$abortError ) {
2727 # If an account is made with name X, and one is pending with name X
2828 # we will have problems if the pending one is later confirmed
2929 $dbw = wfGetDB( DB_MASTER );
Index: trunk/extensions/ConfirmAccount/presentation/specialpages/actions/RequestAccount_body.php
@@ -225,7 +225,7 @@
226226 # Now create a dummy user ($u) and check if it is valid
227227 $name = trim( $this->mUsername );
228228 $u = User::newFromName( $name, 'creatable' );
229 - if ( is_null( $u ) ) {
 229+ if ( !$u ) {
230230 $this->showForm( wfMsgHtml( 'noname' ) );
231231 return;
232232 }

Status & tagging log