registration: Catch correct exception type from ObjectCache
authorKunal Mehta <legoktm@member.fsf.org>
Mon, 11 Jun 2018 20:57:58 +0000 (13:57 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 11 Jun 2018 21:09:47 +0000 (21:09 +0000)
ObjectCache::newFromId() now throws an InvalidArgumentException if the
specific id can't be found.

Change-Id: Idcb0f2158a38555c1ec1681ba0635c7903e48718

includes/registration/ExtensionRegistry.php

index a3684e8..c58b55e 100644 (file)
@@ -144,7 +144,7 @@ class ExtensionRegistry {
                        // been loaded
                        $cacheId = ObjectCache::detectLocalServerCache();
                        $cache = ObjectCache::newFromId( $cacheId );
-               } catch ( MWException $e ) {
+               } catch ( InvalidArgumentException $e ) {
                        $cache = new EmptyBagOStuff();
                }
                // See if this queue is in APC