Fix `SingleSelectionFormField::validate()`
authorMatthias Schmidt <gravatronics@live.com>
Sat, 7 Jul 2018 15:22:26 +0000 (17:22 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 7 Jul 2018 15:22:26 +0000 (17:22 +0200)
See #2509

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

index 8690a66502c890490b8c3b65f032c6f8747811c1..7e542a628b4f282dd6d6419104a861b1795d7d3f 100644 (file)
@@ -71,7 +71,7 @@ class SingleSelectionFormField extends AbstractFormField implements INullableFor
                        return $this;
                }
                
-               if (!isset($this->getOptions()[$this->getValue()])) {
+               if (!isset($this->getOptions()[$value])) {
                        throw new \InvalidArgumentException("Unknown value '{$value}'");
                }