Merge "Improve MapCacheLRU error message"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 14 Aug 2018 16:24:50 +0000 (16:24 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 14 Aug 2018 16:24:50 +0000 (16:24 +0000)
includes/libs/MapCacheLRU.php

index 4f1e7b0..3a549af 100644 (file)
@@ -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;