mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Fix a warning in the JIRA field
Summary: Ref T3687. The `value` property may be `null`. Test Plan: Loaded a revision with the JIRA field enabled but no issues attached, no longer saw a warning about a bad argument to `foreach()`. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T3687 Differential Revision: https://secure.phabricator.com/D6890
This commit is contained in:
parent
2d240142c8
commit
470bb4931b
1 changed files with 8 additions and 6 deletions
|
@ -145,6 +145,7 @@ final class DifferentialJIRAIssuesFieldSpecification
|
||||||
$provider = PhabricatorAuthProviderOAuth1JIRA::getJIRAProvider();
|
$provider = PhabricatorAuthProviderOAuth1JIRA::getJIRAProvider();
|
||||||
|
|
||||||
$refs = array();
|
$refs = array();
|
||||||
|
if ($this->value) {
|
||||||
foreach ($this->value as $jira_key) {
|
foreach ($this->value as $jira_key) {
|
||||||
$refs[] = id(new DoorkeeperObjectRef())
|
$refs[] = id(new DoorkeeperObjectRef())
|
||||||
->setApplicationType(DoorkeeperBridgeJIRA::APPTYPE_JIRA)
|
->setApplicationType(DoorkeeperBridgeJIRA::APPTYPE_JIRA)
|
||||||
|
@ -152,6 +153,7 @@ final class DifferentialJIRAIssuesFieldSpecification
|
||||||
->setObjectType(DoorkeeperBridgeJIRA::OBJTYPE_ISSUE)
|
->setObjectType(DoorkeeperBridgeJIRA::OBJTYPE_ISSUE)
|
||||||
->setObjectID($jira_key);
|
->setObjectID($jira_key);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $refs;
|
return $refs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue