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