From: Alexandre Emsenhuber Date: Sat, 5 Dec 2009 21:26:42 +0000 (+0000) Subject: User::newFromName() can return false on invalid user name, and thus was throwing... X-Git-Tag: 1.31.0-rc.0~38616 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=19d188a88c2670f8274038a2225ba136c08328bf;p=lhc%2Fweb%2Fwiklou.git User::newFromName() can return false on invalid user name, and thus was throwing "PHP Fatal error: Call to a member function idForName() on a non-object in includes/specials/SpecialUserlogin.php on line 280" --- diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 52979649f9..0948ced9f0 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -272,7 +272,7 @@ class LoginForm { return false; } - if ( is_null( $u ) ) { + if ( is_null( $u ) || $u === false ) { $this->mainLoginForm( wfMsg( 'noname' ) ); return false; }