From 035f4635ef1a9ae74d34a08d1aeb9fd51a813e08 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Mon, 11 Sep 2017 10:33:29 -0400 Subject: [PATCH] Use CommentStore::getCommentLegacy with CommentStore::getFields It doesn't matter when $wgCommentTableSchemaMigrationStage is MIGRATION_OLD, but it'll fail when we start changing that to later migration stages. Follows up I3447a412. Change-Id: I6c010cefedd99324080ec078b83159d12709c1b1 --- 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 6d003d64bf..8aea7abade 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -538,7 +538,8 @@ class LocalFile extends File { $this->extraDataLoaded = true; $this->description = CommentStore::newKey( "{$prefix}description" ) - ->getComment( $row )->text; + // $row is probably using getFields() from self::getCacheFields() + ->getCommentLegacy( wfGetDB( DB_REPLICA ), $row )->text; $array = $this->decodeRow( $row, $prefix ); -- 2.20.1