From 6dc20d1e2e710afea9f540624ff6d25bb3598d42 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 8 May 2020 16:49:14 -0700 Subject: [PATCH] Fix an issue where storage inlines are fed to InlineAdjustmentEngine Summary: Ref T13513. If an intradiff has at least one unchanged file ("hasSameEffectAs()") or more than 100 files ("Large Change"), we hit this block and don't upcast storage inlines to runtime inlines. I missed this in testing. Add the conversion step. Test Plan: Viewed an intradiff with at least one unchanged file and at least one inline comment, saw correct rendering instead of fatal. Maniphest Tasks: T13513 Differential Revision: https://secure.phabricator.com/D21239 --- .../controller/DifferentialRevisionViewController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php index 368accd0eb..ccb4b85867 100644 --- a/src/applications/differential/controller/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/DifferentialRevisionViewController.php @@ -234,6 +234,8 @@ final class DifferentialRevisionViewController ->withPublishedComments(true) ->execute(); + $inlines = mpull($inlines, 'newInlineCommentObject'); + $inlines = id(new PhabricatorInlineCommentAdjustmentEngine()) ->setViewer($viewer) ->setRevision($revision)