Skip to content

Commit

Permalink
fix(DropdownField): fix array key value format
Browse files Browse the repository at this point in the history
  • Loading branch information
stonebuzz authored and btry committed Mar 31, 2023
1 parent b3fb080 commit 7729fe2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/field/dropdownfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ protected function getEntityRestriction() {
switch ($restrictionPolicy) {
case self::ENTITY_RESTRICT_FORM:
$form = PluginFormcreatorForm::getByItem($this->getQuestion());
$formEntities = [$form->fields['entities_id']];
$formEntities = [$form->fields['entities_id'] => $form->fields['entities_id']];
if ($form->fields['is_recursive']) {
$formEntities = $formEntities + (new DBUtils())->getSonsof(Entity::getTable(), $form->fields['entities_id']);
}
Expand All @@ -868,7 +868,7 @@ protected function getEntityRestriction() {

case self::ENTITY_RESTRICT_BOTH:
$form = PluginFormcreatorForm::getByItem($this->getQuestion());
$formEntities = [$form->fields['entities_id']];
$formEntities = [$form->fields['entities_id'] => $form->fields['entities_id']];
if ($form->fields['is_recursive']) {
$formEntities = $formEntities + (new DBUtils())->getSonsof(Entity::getTable(), $form->fields['entities_id']);
}
Expand Down

0 comments on commit 7729fe2

Please sign in to comment.