From: Alexandre Emsenhuber Date: Sun, 14 Apr 2013 20:43:58 +0000 (+0200) Subject: Fixed incorrect parameter passed to LoginForm::userBlockedMessage() X-Git-Tag: 1.31.0-rc.0~20005^2 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=42c8f3f21f157a9f7ea3e3f875eae6d63fd094f1;p=lhc%2Fweb%2Fwiklou.git Fixed incorrect parameter passed to LoginForm::userBlockedMessage() The error is Catchable fatal error: Argument 1 passed to LoginForm::userBlockedMessage() must be an instance of Block, null given. The problem is that User::$mBlock is not always the correct block, when checking that a blocked logged-in user can create an account. bug: 47138 Change-Id: I43f35cfa342737f05a08a693a86949c14348321f --- diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index c0d4951a7a..b360979827 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -29,7 +29,8 @@ production. === Bug fixes in 1.22 === * Disable Special:PasswordReset when $wgEnableEmail. Previously one could still navigate to the page by entering the URL directly. - +* (bug 47138) Fixed a fatal error when a blocked user tries to automatically + create an account on login due external authentication in some circumstances. === API changes in 1.22 === * (bug 46626) xmldoublequote parameter was removed. Because of a bug, the diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 41c63b6c31..e0ddc962ce 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -819,7 +819,7 @@ class LoginForm extends SpecialPage { $this->resetLoginForm( $this->msg( 'resetpass_announce' )->text() ); break; case self::CREATE_BLOCKED: - $this->userBlockedMessage( $this->getUser()->mBlock ); + $this->userBlockedMessage( $this->getUser()->isBlockedFromCreateAccount() ); break; case self::THROTTLED: $this->mainLoginForm( $this->msg( 'login-throttled' )->text() );