Merge "SpecialPreferences: Escape HTML in tab titles in legacy form"
[lhc/web/wiklou.git] / includes / libs / MapCacheLRU.php
index a0381de..3a549af 100644 (file)
@@ -64,7 +64,7 @@ class MapCacheLRU implements IExpiringStore, Serializable {
                Assert::parameter( $maxKeys > 0, '$maxKeys', 'must be above zero' );
 
                $this->maxCacheKeys = $maxKeys;
-               // Use the current time as the default "as of" timesamp of entries
+               // Use the current time as the default "as of" timestamp of entries
                $this->epoch = $this->getCurrentTime();
        }
 
@@ -189,7 +189,9 @@ class MapCacheLRU implements IExpiringStore, Serializable {
                }
 
                if ( !is_array( $this->cache[$key] ) ) {
-                       throw new UnexpectedValueException( "The value of '$key' is not an array." );
+                       $type = gettype( $this->cache[$key] );
+
+                       throw new UnexpectedValueException( "The value of '$key' ($type) is not an array." );
                }
 
                $this->cache[$key][$field] = $value;