Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/63706
Change subject: Fixed bug in LocalFile::isCacheable(). ...................................................................... Fixed bug in LocalFile::isCacheable(). * The metadata field is actually defaulting to "" not null. Change-Id: I745441c7061494db26de7f64dda30b80171c9443 --- M includes/filerepo/file/LocalFile.php 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/06/63706/1 diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index b07186d..3cb1f41 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1686,8 +1686,9 @@ * @return bool Whether to cache in RepoGroup (this avoids OOMs) */ function isCacheable() { - $this->load(); // if loaded from cache, metadata will be null if it didn't fit - return $this->metadata !== null + $this->load(); + // If extra data (metadata) was not loaded then it must have been large + return $this->extraDataLoaded && strlen( serialize( $this->metadata ) ) <= self::CACHE_FIELD_MAX_LEN; } -- To view, visit https://gerrit.wikimedia.org/r/63706 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I745441c7061494db26de7f64dda30b80171c9443 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits