From: Tim Starling Date: Fri, 8 Aug 2008 09:47:36 +0000 (+0000) Subject: Fix fix r38823 X-Git-Tag: 1.31.0-rc.0~46025 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=6f90d73d8535a614e7755679a98f2eb8b026787b;p=lhc%2Fweb%2Fwiklou.git Fix fix r38823 --- diff --git a/includes/Article.php b/includes/Article.php index 2b933bce0b..21ec092412 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2767,10 +2767,12 @@ class Article { && !($minoredit && $wgUser->isAllowed('nominornewtalk') ) ) { if (wfRunHooks('ArticleEditUpdateNewTalk', array(&$this)) ) { $other = User::newFromName( $shortTitle ); - if( User::isIP( $shortTitle ) ) { + if ( !$other ) { + wfDebug( __METHOD__.": invalid username\n" ); + } elseif( User::isIP( $shortTitle ) ) { // An anonymous user $other->setNewtalk( true ); - } elseif( $other instanceof User && $other->isLoggedIn() ) { + } elseif( $other->isLoggedIn() ) { $other->setNewtalk( true ); } else { wfDebug( __METHOD__. ": don't need to notify a nonexistent user\n" );