jenkins-bot has submitted this change and it was merged.

Change subject: Fixed incorrect parameter passed to 
LoginForm::userBlockedMessage()
......................................................................


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
---
M RELEASE-NOTES-1.22
M includes/specials/SpecialUserlogin.php
2 files changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Parent5446: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index c0d4951..b360979 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -29,7 +29,8 @@
 === 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 41c63b6..e0ddc96 100644
--- a/includes/specials/SpecialUserlogin.php
+++ b/includes/specials/SpecialUserlogin.php
@@ -819,7 +819,7 @@
                                $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() );

-- 
To view, visit https://gerrit.wikimedia.org/r/59085
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I43f35cfa342737f05a08a693a86949c14348321f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex <coderev...@emsenhuber.ch>
Gerrit-Reviewer: Parent5446 <tylerro...@gmail.com>
Gerrit-Reviewer: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to