Skip to content

Commit da65e67

Browse files
committed
Fix invalid default values when editing user options
The submitted default value is validated in `UserOptionAddForm` depending on the submitted option type. But when editing a user option there will be no option type submitted, because it is not allowed to change the option type of an existing option. https://www.woltlab.com/community/thread/310689
1 parent 13f1b51 commit da65e67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ public function readParameters()
6060
*/
6161
public function readFormParameters()
6262
{
63+
$this->optionType = $this->userOption->optionType;
64+
6365
parent::readFormParameters();
6466

6567
$this->optionType = $this->userOption->optionType;
@@ -68,9 +70,7 @@ public function readFormParameters()
6870
/**
6971
* @inheritDoc
7072
*/
71-
protected function setDefaultOutputClass()
72-
{
73-
}
73+
protected function setDefaultOutputClass() {}
7474

7575
/**
7676
* @inheritDoc

0 commit comments

Comments
 (0)