Page MenuHomePhabricator

D8758.id20765.diff
No OneTemporary

D8758.id20765.diff

diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php
--- a/src/applications/differential/controller/DifferentialRevisionViewController.php
+++ b/src/applications/differential/controller/DifferentialRevisionViewController.php
@@ -193,11 +193,18 @@
$commit_hashes[] = idx($local_commit, 'local');
}
$commit_hashes = array_unique(array_filter($commit_hashes));
- $commits_for_links = id(new DiffusionCommitQuery())
- ->setViewer($user)
- ->withIdentifiers($commit_hashes)
- ->execute();
- $commits_for_links = mpull($commits_for_links, null, 'getCommitIdentifier');
+ if ($commit_hashes) {
+ $commits_for_links = id(new DiffusionCommitQuery())
+ ->setViewer($user)
+ ->withIdentifiers($commit_hashes)
+ ->execute();
+ $commits_for_links = mpull(
+ $commits_for_links,
+ null,
+ 'getCommitIdentifier');
+ } else {
+ $commit_for_links = array();
+ }
$revision_detail = id(new DifferentialRevisionDetailView())
->setUser($user)

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 21, 9:06 AM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7704535
Default Alt Text
D8758.id20765.diff (1 KB)

Event Timeline