From 9c62a10989e03e518f855de3fc0a610543287c71 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 3 Feb 2017 18:30:21 -0800 Subject: [PATCH] Limit damage caused by bad panels on dashboards you can manage Summary: Fixes T12203. If you tried to //manage// a dashboard which had a panel you can't see, we'd try to render bogus actions for it and fatal. Instead, for the moment, survive. Presumably we'll ship a real fix for this in the next release or so, and tackle T10612 / T10145, which I think are closely related. Test Plan: {F2570418} Reviewers: chad Reviewed By: chad Maniphest Tasks: T12203 Differential Revision: https://secure.phabricator.com/D17311 --- .../engine/PhabricatorDashboardPanelRenderingEngine.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php b/src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php index d39dd826eb..286d749a18 100644 --- a/src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php +++ b/src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php @@ -255,6 +255,10 @@ final class PhabricatorDashboardPanelRenderingEngine extends Phobject { PHUIHeaderView $header) { $panel = $this->getPanel(); + if (!$panel) { + return $header; + } + $dashboard_id = $this->getDashboardID(); $edit_uri = id(new PhutilURI( '/dashboard/panel/edit/'.$panel->getID().'/'));