Fix missing reset in MultipleSelectionFormField
authorMarcel Werk <burntime@woltlab.com>
Wed, 31 Jul 2024 14:55:27 +0000 (16:55 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 31 Jul 2024 14:55:27 +0000 (16:55 +0200)
ref https://www.woltlab.com/community/thread/295945-multipleselectionformfield-%C3%BCbergibt-falschen-bzw-alten-wert-wenn-kein-wert-ausge/

wcfsetup/install/files/lib/system/form/builder/field/MultipleSelectionFormField.class.php

index 563708e9af7602d378683801408845f3f96cbfc3..0fd353f38f6a4a142caf99693c57697284453608 100644 (file)
@@ -89,6 +89,8 @@ class MultipleSelectionFormField extends AbstractFormField implements
             if (\is_array($value)) {
                 $this->value = $value;
             }
+        } else {
+            $this->value = [];
         }
 
         return $this;