Fixed validation of required boolean fields
authorMarcel Werk <burntime@woltlab.com>
Thu, 16 Jul 2015 10:09:14 +0000 (12:09 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 16 Jul 2015 10:09:14 +0000 (12:09 +0200)
wcfsetup/install/files/lib/system/option/user/UserOptionHandler.class.php

index 67ed0e848fce566bac9b0d88069e4fb12c053967..bc0b10b253dc90bf4f5c86f086fe048d05d7e28b 100644 (file)
@@ -187,7 +187,7 @@ class UserOptionHandler extends OptionHandler {
        protected function validateOption(Option $option) {
                parent::validateOption($option);
                
-               if ($option->required && empty($this->optionValues[$option->optionName])) {
+               if ($option->required && $option->optionType != 'boolean' && empty($this->optionValues[$option->optionName])) {
                        throw new UserInputException($option->optionName);
                }