Avoid fatal on login if username is invalid title
authorAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 9 Mar 2010 19:27:36 +0000 (19:27 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 9 Mar 2010 19:27:36 +0000 (19:27 +0000)
commit1f6c59acfc6406c89ca6fd561b3c8f07d23a122f
tree17f3b5a313a86116d858aa1a1166f8b98fc985d8
parente01b0adb1a23db588986f4a550dff983ecd40dc8
Avoid fatal on login if username is invalid title

Steps to reproduce: Try logging in with a 256-character username.

Expected result: Friendly error message saying the name is invalid.

Actual result: Fatal error: Call to a member function getName() on a
non-object in /var/www/git-trunk/phase3/includes/specials/SpecialUserlogin.php
on line 433

Fix: If you want to check whether something is a User object, check
whether it's a User object.  There are things other than null that don't
behave like User objects.
includes/specials/SpecialUserlogin.php