Skip to content

Commit 061c1c1

Browse files
author
epriestley
committed
Fix undefined $repository
Auditors: btrahan
1 parent c1e8d97 commit 061c1c1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/applications/herald/adapter/HeraldDifferentialAdapter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,17 @@ public function setDiff(DifferentialDiff $diff) {
2020
public function loadRepository() {
2121
if ($this->repository === false) {
2222
$repository_phid = $this->getObject()->getRepositoryPHID();
23+
2324
if ($repository_phid) {
2425
$repository = id(new PhabricatorRepositoryQuery())
2526
->setViewer(PhabricatorUser::getOmnipotentUser())
2627
->withPHIDs(array($repository_phid))
2728
->needProjectPHIDs(true)
2829
->executeOne();
30+
} else {
31+
$repository = null;
2932
}
33+
3034
$this->repository = $repository;
3135
}
3236

0 commit comments

Comments
 (0)