From: Joshua Rüsweg Date: Tue, 5 Feb 2019 11:26:31 +0000 (+0100) Subject: Set form data only if the form is not submitted X-Git-Tag: 5.2.0_Alpha_1~296^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9c0c0d5de656bf0c5f7a88885ea593aa5b10aa2a;p=GitHub%2FWoltLab%2FWCF.git Set form data only if the form is not submitted See #2825 See #2509 --- diff --git a/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php b/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php index f0f0cd7533..03af8da28b 100644 --- a/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php +++ b/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php @@ -110,7 +110,9 @@ abstract class AbstractFormBuilderForm extends AbstractForm { */ public function readData() { if ($this->formObject !== null) { - $this->setFormObjectData(); + if (empty($_POST)) { + $this->setFormObjectData(); + } } else if ($this->formAction === 'edit') { throw new \UnexpectedValueException("Missing form object to update.");