getUser() will always return a User object

Change-Id: Ic729992db4db459044a239ec34d95e56b013841d
This commit is contained in:
Kunal Mehta 2018-04-15 16:55:25 -07:00 committed by Jdlrobson
parent 1ccaa51ca8
commit 892adf0ea7
1 changed files with 9 additions and 11 deletions

View File

@ -498,7 +498,6 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
// Watchlist link
$watchlistQuery = [];
$user = $this->getUser();
if ( $user ) {
// Avoid fatal when MobileFrontend not available (T171241)
if ( class_exists( 'SpecialMobileWatchlist' ) ) {
$view = $user->getOption( SpecialMobileWatchlist::VIEW_OPTION_NAME, false );
@ -510,7 +509,6 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
$watchlistQuery['filter'] = $filter;
}
}
}
$menu->insert( 'watchlist', $isJSOnly = true )
->addComponent(