r59893 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59892‎ | r59893 | r59894 >
Date:18:25, 9 December 2009
Author:demon
Status:ok
Tags:
Comment:
Fix r59761,r59797: check if is_object()
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 ( !$u instanceof User ) {
 276+ if ( !is_object( $u ) ) {
277277 $this->mainLoginForm( wfMsg( 'noname' ) );
278278 return false;
279279 }

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
r59797Per Nikerabbit, follow-up to r59761: just check for "instanceof User"ialex19:42, 7 December 2009

Status & tagging log