From 38ca9f9ad932e71af20fbd862f247b8cd3d62598 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 13 Oct 2018 11:46:29 +0200 Subject: [PATCH] Fix setting value of multiple selection form field See #2509 --- .../form/builder/field/MultipleSelectionFormField.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) . '"'); } -- 2.20.1