mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-30 01:10:58 +01:00
Fix a fatal on the commit author list
Summary: I think we only hit this because I mucked around with the database to recover from the runaway parse of the Diviner repository (now prevented by D1253), but be more robust against missing data in this interface. Test Plan: After applying this patch, no longer received a fatal on the commit history page for users linked to nonexistant/bogus commits. Reviewers: jack, btrahan, jungejason, aran Reviewed By: aran CC: aran Maniphest Tasks: T701 Differential Revision: https://secure.phabricator.com/D1264
This commit is contained in:
parent
3b65864ee1
commit
99a9c082f9
1 changed files with 10 additions and 2 deletions
|
@ -105,7 +105,15 @@ class DiffusionCommitListController extends DiffusionController {
|
|||
foreach ($commit_phids as $phid) {
|
||||
$handle = $handles[$phid];
|
||||
$object = $objects[$phid];
|
||||
$commit_data = $object->getCommitData();
|
||||
|
||||
$summary = null;
|
||||
if ($object) {
|
||||
$commit_data = $object->getCommitData();
|
||||
if ($commit_data) {
|
||||
$summary = $commit_data->getSummary();
|
||||
}
|
||||
}
|
||||
|
||||
$epoch = $handle->getTimeStamp();
|
||||
$date = phabricator_date($epoch, $user);
|
||||
$time = phabricator_time($epoch, $user);
|
||||
|
@ -119,7 +127,7 @@ class DiffusionCommitListController extends DiffusionController {
|
|||
$link,
|
||||
$date,
|
||||
$time,
|
||||
phutil_escape_html($commit_data->getSummary()),
|
||||
phutil_escape_html($summary),
|
||||
);
|
||||
}
|
||||
$commit_table = new AphrontTableView($rows);
|
||||
|
|
Loading…
Reference in a new issue