r59797 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59796‎ | r59797 | r59798 >
Date:19:42, 7 December 2009
Author:ialex
Status:resolved (Comments)
Tags:
Comment:
Per Nikerabbit, follow-up to r59761: just check for "instanceof User"
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -272,7 +272,7 @@
273273 return false;
274274 }
275275
276 - if ( is_null( $u ) || $u === false ) {
 276+ if ( !$u instanceof User ) {
277277 $this->mainLoginForm( wfMsg( 'noname' ) );
278278 return false;
279279 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r59893Fix r59761,r59797: check if is_object()demon18:25, 9 December 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r59761User::newFromName() can return false on invalid user name, and thus was throw...ialex21:26, 5 December 2009

Comments

#Comment by Tim Starling (talk | contribs)   23:25, 8 December 2009

Fixme per comment on r59761.

#Comment by 😂 (talk | contribs)   18:31, 9 December 2009

Should be resolved with r59893.

Status & tagging log