mirror of
https://we.phorge.it/source/phorge.git
synced 2025-03-24 02:01:01 +01:00
Fix issue with rendering policy controls when an install has zero projects
Fixes T10290. Auditors: cahd
This commit is contained in:
parent
1db4de7dbc
commit
74825fccc4
1 changed files with 7 additions and 2 deletions
|
@ -167,12 +167,17 @@ final class AphrontFormPolicyControl extends AphrontFormControl {
|
|||
|
||||
$type_project = PhabricatorPolicyType::TYPE_PROJECT;
|
||||
|
||||
// Make sure we have a "Projects" group before we adjust it.
|
||||
if (empty($options[$type_project])) {
|
||||
$options[$type_project] = array();
|
||||
}
|
||||
|
||||
$options[$type_project] = isort($options[$type_project], 'sort');
|
||||
|
||||
$placeholder = id(new PhabricatorPolicy())
|
||||
->setName(pht('Other Project...'))
|
||||
->setIcon('fa-search');
|
||||
|
||||
$options[$type_project] = isort($options[$type_project], 'sort');
|
||||
|
||||
$options[$type_project][$this->getSelectProjectKey()] = array(
|
||||
'name' => $placeholder->getName(),
|
||||
'full' => $placeholder->getName(),
|
||||
|
|
Loading…
Add table
Reference in a new issue