From 95a2c1b398777988a7ab245e5e97fb7a03db6a3c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Tue, 20 Sep 2011 13:52:47 +0000 Subject: [PATCH] No need to check isset before unset, shortens the code a bit, and added some whitespace --- includes/cache/LinkCache.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/includes/cache/LinkCache.php b/includes/cache/LinkCache.php index aeb10eb012..1deb99794a 100644 --- a/includes/cache/LinkCache.php +++ b/includes/cache/LinkCache.php @@ -114,15 +114,9 @@ class LinkCache { */ public function clearLink( $title ) { $dbkey = $title->getPrefixedDbKey(); - if( isset($this->mBadLinks[$dbkey]) ) { - unset($this->mBadLinks[$dbkey]); - } - if( isset($this->mGoodLinks[$dbkey]) ) { - unset($this->mGoodLinks[$dbkey]); - } - if( isset($this->mGoodLinkFields[$dbkey]) ) { - unset($this->mGoodLinkFields[$dbkey]); - } + unset( $this->mBadLinks[$dbkey] ); + unset( $this->mGoodLinks[$dbkey] ); + unset( $this->mGoodLinkFields[$dbkey] ); } public function getGoodLinks() { return $this->mGoodLinks; } -- 2.20.1