From: Matthias Schmidt Date: Sat, 13 Oct 2018 09:46:29 +0000 (+0200) Subject: Fix setting value of multiple selection form field X-Git-Tag: 5.2.0_Alpha_1~364^2~7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=38ca9f9ad932e71af20fbd862f247b8cd3d62598;p=GitHub%2FWoltLab%2FWCF.git Fix setting value of multiple selection form field See #2509 --- diff --git a/wcfsetup/install/files/lib/system/form/builder/field/MultipleSelectionFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/MultipleSelectionFormField.class.php index f30ece0394..3dd841f580 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/MultipleSelectionFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/MultipleSelectionFormField.class.php @@ -66,7 +66,7 @@ class MultipleSelectionFormField extends AbstractFormField implements INullableF throw new \InvalidArgumentException("Given value is no array, " . gettype($value) . " given."); } - $unknownValues = array_diff($this->getValue(), array_keys($this->getOptions())); + $unknownValues = array_diff($value, array_keys($this->getOptions())); if (!empty($unknownValues)) { throw new \InvalidArgumentException("Unknown values '" . implode("', '", $unknownValues) . '"'); }