Commit c68b1cdc authored by Florent Torregrosa's avatar Florent Torregrosa Committed by christian.wiedemann
Browse files

Issue #3268017 by Grimreaper: Checkboxes is not using option key as value but the option label

parent 37ca1c0d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -23,8 +23,8 @@ class CheckboxesSettingType extends PatternSettingTypeBase {
    $defined_options = $def->getOptions();
    if (is_array($value)) {
      foreach ($value as $checkbox_key => $checkbox_value) {
        if ($checkbox_value != "0") {
          $selected_options[$checkbox_key] = isset($defined_options[$checkbox_value]) ? $defined_options[$checkbox_value] : $checkbox_value;
        if ($checkbox_value != "0" && isset($defined_options[$checkbox_value])) {
          $selected_options[$checkbox_key] = $checkbox_value;
        }
      }
    }