Ignore cache keys from previous version
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 14 May 2005 09:54:26 +0000 (09:54 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 14 May 2005 09:54:26 +0000 (09:54 +0000)
includes/Image.php

index 0e0c174..a22ae0a 100644 (file)
@@ -110,7 +110,9 @@ class Image
                $cachedValues = $wgMemc->get( $keys[0] );
 
                // Check if the key existed and belongs to this version of MediaWiki
-               if (!empty($cachedValues) && is_array($cachedValues) && isset($cachedValues['width']) && $cachedValues['fileExists']) {
+               if (!empty($cachedValues) && is_array($cachedValues) && isset($cachedValues['width']) 
+                 && $cachedValues['fileExists'] && isset( $cachedValues['metadata'] ) ) 
+               {
                        if ( $wgUseSharedUploads && $cachedValues['fromShared']) {
                                # if this is shared file, we need to check if image
                                # in shared repository has not changed