Fix validating style when editing users in ACP
authorMatthias Schmidt <gravatronics@live.com>
Thu, 2 Jul 2020 17:03:19 +0000 (19:03 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 2 Jul 2020 17:03:19 +0000 (19:03 +0200)
See #3254

wcfsetup/install/files/lib/acp/form/UserEditForm.class.php

index 9a94c562f99a923027d0f416dab0d16a98713357..ac99ae5531c978a8e7aef9cad5f9b471cfd93452 100755 (executable)
@@ -147,7 +147,7 @@ class UserEditForm extends UserAddForm {
         * @var         int
         * @since       5.3
         */
-       public $styleID;
+       public $styleID = 0;
        
        /**
         * @inheritDoc
@@ -548,7 +548,7 @@ class UserEditForm extends UserAddForm {
                parent::validate();
                
                if (!isset($this->availableStyles[$this->styleID])) {
-                       throw new UserInputException('styleID', 'noValidSelection');
+                       $this->styleID = 0;
                }
        }
 }