Skip to content

Commit 7729fe2

Browse files
stonebuzzbtry
authored andcommitted
fix(DropdownField): fix array key value format
1 parent b3fb080 commit 7729fe2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

inc/field/dropdownfield.class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ protected function getEntityRestriction() {
859859
switch ($restrictionPolicy) {
860860
case self::ENTITY_RESTRICT_FORM:
861861
$form = PluginFormcreatorForm::getByItem($this->getQuestion());
862-
$formEntities = [$form->fields['entities_id']];
862+
$formEntities = [$form->fields['entities_id'] => $form->fields['entities_id']];
863863
if ($form->fields['is_recursive']) {
864864
$formEntities = $formEntities + (new DBUtils())->getSonsof(Entity::getTable(), $form->fields['entities_id']);
865865
}
@@ -868,7 +868,7 @@ protected function getEntityRestriction() {
868868

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

0 commit comments

Comments
 (0)