objectcache: Remove unused variable $cache which is overriden
authorDerick Alangi <alangiderick@gmail.com>
Mon, 25 Mar 2019 14:20:19 +0000 (15:20 +0100)
committerDerick Alangi <alangiderick@gmail.com>
Mon, 25 Mar 2019 14:20:19 +0000 (15:20 +0100)
This variable was defined to false and immediately overriden in the
if condition below it which makes the assignment above useless.

Change-Id: Ie72ec7a8860d2a38f59f38b3d861217d39da3e29

includes/objectcache/ObjectCache.php

index dc8b146..fed0854 100644 (file)
@@ -238,7 +238,6 @@ class ObjectCache {
                global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType;
                $candidates = [ $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType ];
                foreach ( $candidates as $candidate ) {
-                       $cache = false;
                        if ( $candidate !== CACHE_NONE && $candidate !== CACHE_ANYTHING ) {
                                $cache = self::getInstance( $candidate );
                                // CACHE_ACCEL might default to nothing if no APCu