mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 05:12:41 +01:00
Prevent using deleted repositories when displaying commits for a revision.
Summary: We deleted a repository (I don't remember which one). Some differential revisions where committed to this repository, and opening these revisions show a blank page, because the repository_id is not in the database anymore. This causes the 'ERROR 8: Undefined index: 12 at [phabricator/src/applications/phid/handle/data/PhabricatorObjectHandleData.php:209] ' in our log. Test Plan: Opened a revision which where committed to multiple repositories including the deleted one. Made sure that the page was rendered correctly and there were no messages in the error log. Reviewed By: epriestley Reviewers: epriestley, jungejason CC: aran, epriestley Differential Revision: 598
This commit is contained in:
parent
f9599f4499
commit
f123abcc5a
1 changed files with 2 additions and 1 deletions
|
@ -202,7 +202,8 @@ class PhabricatorObjectHandleData {
|
|||
$handle = new PhabricatorObjectHandle();
|
||||
$handle->setPHID($phid);
|
||||
$handle->setType($type);
|
||||
if (empty($commits[$phid])) {
|
||||
if (empty($commits[$phid]) ||
|
||||
!isset($callsigns[$repository_ids[$phid]])) {
|
||||
$handle->setName('Unknown Commit');
|
||||
} else {
|
||||
$commit = $commits[$phid];
|
||||
|
|
Loading…
Reference in a new issue