mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-25 14:08:19 +01:00
Arrayish fields should always return arrays
Summary: Array-like fields in HerladCommitAdapter should always return things of type array. If they return array(...) or null, then array_*() functions sporadically break. Test Plan: Ran a PhabricatorRepositoryCommitHeraldWorker for a troublesome commit. Failed before; fails no more. Reviewers: epriestley, jungejason Reviewed By: epriestley CC: aran, Korvin, vdt Maniphest Tasks: T1385 Differential Revision: https://secure.phabricator.com/D2793
This commit is contained in:
parent
c53ed032c9
commit
83a5f1479d
1 changed files with 2 additions and 2 deletions
|
@ -175,13 +175,13 @@ final class HeraldCommitAdapter extends HeraldObjectAdapter {
|
||||||
case HeraldFieldConfig::FIELD_DIFFERENTIAL_REVIEWERS:
|
case HeraldFieldConfig::FIELD_DIFFERENTIAL_REVIEWERS:
|
||||||
$revision = $this->loadDifferentialRevision();
|
$revision = $this->loadDifferentialRevision();
|
||||||
if (!$revision) {
|
if (!$revision) {
|
||||||
return null;
|
return array();
|
||||||
}
|
}
|
||||||
return $revision->getReviewers();
|
return $revision->getReviewers();
|
||||||
case HeraldFieldConfig::FIELD_DIFFERENTIAL_CCS:
|
case HeraldFieldConfig::FIELD_DIFFERENTIAL_CCS:
|
||||||
$revision = $this->loadDifferentialRevision();
|
$revision = $this->loadDifferentialRevision();
|
||||||
if (!$revision) {
|
if (!$revision) {
|
||||||
return null;
|
return array();
|
||||||
}
|
}
|
||||||
return $revision->getCCPHIDs();
|
return $revision->getCCPHIDs();
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Reference in a new issue