1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-10 23:01:04 +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:
Edward Speyer 2012-06-18 21:07:12 -07:00
parent c53ed032c9
commit 83a5f1479d

View file

@ -175,13 +175,13 @@ final class HeraldCommitAdapter extends HeraldObjectAdapter {
case HeraldFieldConfig::FIELD_DIFFERENTIAL_REVIEWERS:
$revision = $this->loadDifferentialRevision();
if (!$revision) {
return null;
return array();
}
return $revision->getReviewers();
case HeraldFieldConfig::FIELD_DIFFERENTIAL_CCS:
$revision = $this->loadDifferentialRevision();
if (!$revision) {
return null;
return array();
}
return $revision->getCCPHIDs();
default: