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

Don't fatal on missing commit in DiffusionBrowseFileController

Summary:
Still not 100% sure what the repro case here is, but we do something similar on line 438 above. One case could be an SVN repo with a subpath specified, I think.

In any case, don't fatal if we're missing the commit.

Test Plan: Loaded some browse views, although I don't have a repro.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D2959
This commit is contained in:
epriestley 2012-07-11 17:02:15 -07:00
parent dc75e79cb5
commit ff4774a970

View file

@ -463,7 +463,11 @@ final class DiffusionBrowseFileController extends DiffusionController {
),
phutil_escape_html(phutil_utf8_shorten($line['commit'], 9, '')));
$revision_id = idx($revision_ids, $commits[$commit]->getPHID());
$revision_id = null;
if (idx($commits, $commit)) {
$revision_id = idx($revision_ids, $commits[$commit]->getPHID());
}
if ($revision_id) {
$revision = idx($revisions, $revision_id);
if (!$revision) {