From e42c4b82f55ed8370d56859d1c7e84cfce6ccf97 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 14 May 2013 11:06:35 -0700 Subject: [PATCH] Fixed LocalFile::isCacheable() to account for object type metadata. Change-Id: I8104201c84ea008446df587650a098f6732b8d39 --- includes/filerepo/file/LocalFile.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 932a1d4778..b07186d20a 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1687,7 +1687,8 @@ class LocalFile extends File { */ function isCacheable() { $this->load(); // if loaded from cache, metadata will be null if it didn't fit - return $this->metadata !== null && strlen( $this->metadata ) <= self::CACHE_FIELD_MAX_LEN; + return $this->metadata !== null + && strlen( serialize( $this->metadata ) ) <= self::CACHE_FIELD_MAX_LEN; } /** -- 2.20.1