Commit 22fa2af7 authored by Amjad Khan's avatar Amjad Khan Committed by Jacob Rockowitz
Browse files

Issue #3324914 by amjad1233: Warning: Undefined array key "#options" leads to...

Issue #3324914 by amjad1233: Warning: Undefined array key "#options" leads to TypeError: Drupal\Core\Form\OptGroup::flattenOptions():
parent d603843e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -785,7 +785,7 @@ abstract class OptionsBase extends WebformElementBase {

    $plugin_id = $this->getPluginId();
    $name = $element['#webform_key'];
    $options = OptGroup::flattenOptions($element['#options']);
    $options = isset($element['#options']) ? OptGroup::flattenOptions($element['#options']) : [];
    if ($this->getElementSelectorInputsOptions($element)) {
      $other_type = $this->getOptionsOtherType();
      $multiple = ($this->hasMultipleValues($element) && $other_type === 'select') ? '[]' : '';