mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Fix undefined $repository
Auditors: btrahan
This commit is contained in:
parent
c1e8d97069
commit
061c1c1494
1 changed files with 4 additions and 0 deletions
|
@ -20,13 +20,17 @@ abstract class HeraldDifferentialAdapter extends HeraldAdapter {
|
|||
public function loadRepository() {
|
||||
if ($this->repository === false) {
|
||||
$repository_phid = $this->getObject()->getRepositoryPHID();
|
||||
|
||||
if ($repository_phid) {
|
||||
$repository = id(new PhabricatorRepositoryQuery())
|
||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||
->withPHIDs(array($repository_phid))
|
||||
->needProjectPHIDs(true)
|
||||
->executeOne();
|
||||
} else {
|
||||
$repository = null;
|
||||
}
|
||||
|
||||
$this->repository = $repository;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue