From: Roan Kattouw Date: Wed, 23 Sep 2009 13:51:47 +0000 (+0000) Subject: (bug 20773) Disabling LocalisationUpdate breaks stuff. Added a check that verifies... X-Git-Tag: 1.31.0-rc.0~39562 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=7c7909f108dfcec5144563aa3c25fb06337348a4;p=lhc%2Fweb%2Fwiklou.git (bug 20773) Disabling LocalisationUpdate breaks stuff. Added a check that verifies each dependency object is a CacheDependency before using it, and considers the cache expired otherwise. --- diff --git a/includes/LocalisationCache.php b/includes/LocalisationCache.php index ae9007fb37..81f95aa417 100644 --- a/includes/LocalisationCache.php +++ b/includes/LocalisationCache.php @@ -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;