* (bug 2173) Fatal error when removing an article with an empty title from
[lhc/web/wiklou.git] / includes / SpecialWatchlist.php
index f6833de..97093d0 100644 (file)
@@ -50,7 +50,7 @@ function wfSpecialWatchlist( $par ) {
                $wgOut->addHTML( '<p>' );
                foreach($id as $one) {
                        $t = Title::newFromURL( $one );
-                       if($t->getDBkey() != '') {
+                       if( !is_null( $t ) ) {
                                $wl = WatchedItem::fromUserTitle( $wgUser, $t );
                                if( $wl->removeWatch() === false ) {
                                        $wgOut->addHTML( "<br />\n" . wfMsg( 'couldntremove', htmlspecialchars($one) ) );