r38871 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38870‎ | r38871 | r38872 >
Date:09:47, 8 August 2008
Author:tstarling
Status:old
Tags:
Comment:
Fix fix r38823
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -2767,10 +2767,12 @@
27682768 && !($minoredit && $wgUser->isAllowed('nominornewtalk') ) ) {
27692769 if (wfRunHooks('ArticleEditUpdateNewTalk', array(&$this)) ) {
27702770 $other = User::newFromName( $shortTitle );
2771 - if( User::isIP( $shortTitle ) ) {
 2771+ if ( !$other ) {
 2772+ wfDebug( __METHOD__.": invalid username\n" );
 2773+ } elseif( User::isIP( $shortTitle ) ) {
27722774 // An anonymous user
27732775 $other->setNewtalk( true );
2774 - } elseif( $other instanceof User && $other->isLoggedIn() ) {
 2776+ } elseif( $other->isLoggedIn() ) {
27752777 $other->setNewtalk( true );
27762778 } else {
27772779 wfDebug( __METHOD__. ": don't need to notify a nonexistent user\n" );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r38823Fix on r38763 for "PHP Fatal error: Call to a member function isLoggedIn() o...siebrand00:01, 8 August 2008

Status & tagging log