From 7167a729bf7ec6468fbff495061779b22d0a9f15 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 17 Mar 2014 15:02:10 -0700 Subject: [PATCH] Fail more gracefully when rendering transcripts if handle is missing Summary: Fixes T4628. I can only partially reproduce the root cause here, but if transcript display rules aren't quite right we should just degrade here rather than fatalling. Transcripts are a messy business by any measure. Test Plan: Sort-of-reproing transcript renders OK now. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T4628 Differential Revision: https://secure.phabricator.com/D8554 --- .../herald/controller/HeraldTranscriptController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/applications/herald/controller/HeraldTranscriptController.php b/src/applications/herald/controller/HeraldTranscriptController.php index c08f54d3e8..f67a8f6334 100644 --- a/src/applications/herald/controller/HeraldTranscriptController.php +++ b/src/applications/herald/controller/HeraldTranscriptController.php @@ -297,7 +297,9 @@ final class HeraldTranscriptController extends HeraldController { default: if ($target) { foreach ($target as $k => $phid) { - $target[$k] = $handles[$phid]->getName(); + if (isset($handles[$phid])) { + $target[$k] = $handles[$phid]->getName(); + } } $target = implode("\n", $target); } else {