From: Niklas Laxström Date: Tue, 20 Sep 2011 13:52:47 +0000 (+0000) Subject: No need to check isset before unset, shortens the code a bit, and added some whitespace X-Git-Tag: 1.31.0-rc.0~27532 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=95a2c1b398777988a7ab245e5e97fb7a03db6a3c;p=lhc%2Fweb%2Fwiklou.git No need to check isset before unset, shortens the code a bit, and added some whitespace --- 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; }