From 6f90d73d8535a614e7755679a98f2eb8b026787b Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 8 Aug 2008 09:47:36 +0000 Subject: [PATCH] Fix fix r38823 --- includes/Article.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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" ); -- 2.20.1