closing a store is only available for CDB type
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 19 Nov 2011 16:31:42 +0000 (16:31 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 19 Nov 2011 16:31:42 +0000 (16:31 +0000)
follow up r103684

includes/LocalisationCache.php

index 828ed1c..f22aa6c 100644 (file)
@@ -358,7 +358,10 @@ class LocalisationCache {
                $deps = $this->store->get( $code, 'deps' );
                $keys = $this->store->get( $code, 'list', 'messages' );
                $preload = $this->store->get( $code, 'preload' );
-               $this->store->close( $code );
+               if( $this->store instanceof LCStore_CDB ) {
+                       // Dont leave open filehandler behind after being called
+                       $this->store->close( $code );
+               }
                // Different keys may expire separately, at least in LCStore_Accel
                if ( $deps === null || $keys === null || $preload === null ) {
                        wfDebug( __METHOD__."($code): cache missing, need to make one\n" );