mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
Fix a warning when viewing a revision not attached to a repository
Summary: We'll get a typehint warning on the repository if there's no repository. Check outside the method instead. Test Plan: Loaded page, no warning. Reviewers: btrahan, vrana, jungejason Reviewed By: vrana CC: aran Differential Revision: https://secure.phabricator.com/D2194
This commit is contained in:
parent
fe9ba6bc67
commit
5f615c1e6e
1 changed files with 8 additions and 8 deletions
|
@ -269,10 +269,14 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
$local_view->setUser($user);
|
||||
$local_view->setLocalCommits(idx($props, 'local:commits'));
|
||||
|
||||
if ($repository) {
|
||||
$other_revisions = $this->loadOtherRevisions(
|
||||
$changesets,
|
||||
$target,
|
||||
$repository);
|
||||
} else {
|
||||
$other_revisions = array();
|
||||
}
|
||||
|
||||
$other_view = null;
|
||||
if ($other_revisions) {
|
||||
|
@ -737,10 +741,6 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
|||
PhabricatorRepository $repository) {
|
||||
assert_instances_of($changesets, 'DifferentialChangeset');
|
||||
|
||||
if (!$repository) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$paths = array();
|
||||
foreach ($changesets as $changeset) {
|
||||
$paths[] = $changeset->getAbsoluteRepositoryPath(
|
||||
|
|
Loading…
Reference in a new issue