X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2FWatchedItem.php;h=db6ce8744a77db705221c2a79803a81953bc7ebe;hb=9b65baa1a0c9096aa5ade09df49e3aa75fb6909b;hp=0495536a2641b7fd605b0ef1ac418955e9ffa9ae;hpb=7f91193ef37d534949950c980416b5a921cd5d79;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WatchedItem.php b/includes/WatchedItem.php index 0495536a26..db6ce8744a 100644 --- a/includes/WatchedItem.php +++ b/includes/WatchedItem.php @@ -18,6 +18,7 @@ * @file * @ingroup Watchlist */ +use MediaWiki\Linker\LinkTarget; /** * Representation of a pair of user and title for watchlist entries. @@ -140,11 +141,7 @@ class WatchedItem { */ public function getTitle() { if ( !$this->title ) { - if ( $this->linkTarget instanceof Title ) { - $this->title = $this->linkTarget; - } else { - $this->title = Title::newFromLinkTarget( $this->linkTarget ); - } + $this->title = Title::newFromLinkTarget( $this->linkTarget ); } return $this->title; }