From 9c0c0d5de656bf0c5f7a88885ea593aa5b10aa2a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Tue, 5 Feb 2019 12:26:31 +0100 Subject: [PATCH] Set form data only if the form is not submitted See #2825 See #2509 --- .../install/files/lib/form/AbstractFormBuilderForm.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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."); -- 2.20.1