From b4da5a8181e6576f6c44a9ac7ffe156daf8dacf8 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 13 Aug 2018 22:52:22 -0700 Subject: [PATCH] Improve MapCacheLRU error message Bug: T201893 Change-Id: I74ef2cf31d83186f68e676da1b80c4c44ca28d69 --- includes/libs/MapCacheLRU.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/libs/MapCacheLRU.php b/includes/libs/MapCacheLRU.php index 4f1e7b07d4..3a549af7af 100644 --- a/includes/libs/MapCacheLRU.php +++ b/includes/libs/MapCacheLRU.php @@ -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; -- 2.20.1