(bug 20773) Disabling LocalisationUpdate breaks stuff. Added a check that verifies...
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 23 Sep 2009 13:51:47 +0000 (13:51 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 23 Sep 2009 13:51:47 +0000 (13:51 +0000)
includes/LocalisationCache.php

index ae9007f..81f95aa 100644 (file)
@@ -304,7 +304,11 @@ class LocalisationCache {
                        return true;
                }
                foreach ( $deps as $dep ) {
-                       if ( $dep->isExpired() ) {
+                       // Because we're unserializing stuff from cache, we
+                       // could receive objects of classes that don't exist
+                       // anymore (e.g. uninstalled extensions)
+                       // When this happens, always expire the cache
+                       if ( !$dep instanceof CacheDependency || $dep->isExpired() ) {
                                wfDebug( __METHOD__."($code): cache for $code expired due to " . 
                                        get_class( $dep ) . "\n" );
                                return true;