mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 20:10: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() {
|
public function loadRepository() {
|
||||||
if ($this->repository === false) {
|
if ($this->repository === false) {
|
||||||
$repository_phid = $this->getObject()->getRepositoryPHID();
|
$repository_phid = $this->getObject()->getRepositoryPHID();
|
||||||
|
|
||||||
if ($repository_phid) {
|
if ($repository_phid) {
|
||||||
$repository = id(new PhabricatorRepositoryQuery())
|
$repository = id(new PhabricatorRepositoryQuery())
|
||||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||||
->withPHIDs(array($repository_phid))
|
->withPHIDs(array($repository_phid))
|
||||||
->needProjectPHIDs(true)
|
->needProjectPHIDs(true)
|
||||||
->executeOne();
|
->executeOne();
|
||||||
|
} else {
|
||||||
|
$repository = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->repository = $repository;
|
$this->repository = $repository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue