1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Fix a Diffusion issue where commits that do not show changesets would incorrectly try to render changesets

Summary:
See <https://discourse.phabricator-community.org/t/loading-certain-svn-commits-cause-unhandled-exception/3795/>.

Commits with no changesets (for example, deleted commits) don't generate a "$changesets".

Test Plan: Viewed a commit with no changesets. Before change: exception. After change: saw unusual commit state.

Differential Revision: https://secure.phabricator.com/D21175
This commit is contained in:
epriestley 2020-04-27 10:33:20 -07:00
parent c12db28251
commit 604811bfc5

View file

@ -459,9 +459,12 @@ final class DiffusionCommitController extends DiffusionController {
$filetree = id(new DifferentialFileTreeEngine())
->setViewer($viewer)
->setChangesets($changesets)
->setDisabled(!$show_changesets);
if ($show_changesets) {
$filetree->setChangesets($changesets);
}
$description_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Description'))
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)