From: Aaron Schulz Date: Tue, 14 May 2013 18:06:35 +0000 (-0700) Subject: Fixed LocalFile::isCacheable() to account for object type metadata. X-Git-Tag: 1.31.0-rc.0~19683 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=e42c4b82f55ed8370d56859d1c7e84cfce6ccf97;p=lhc%2Fweb%2Fwiklou.git Fixed LocalFile::isCacheable() to account for object type metadata. Change-Id: I8104201c84ea008446df587650a098f6732b8d39 --- 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; } /**