From 9abd21dedd0dfc51f0fd1ffa22ec12c658ab32b6 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 31 Mar 2019 15:32:01 +0200 Subject: [PATCH] Fix creating UploadFormField without any restrictions See #2509 See #2825 --- .../lib/system/form/builder/field/UploadFormField.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/form/builder/field/UploadFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/UploadFormField.class.php index 821ea4495d..72b43c3800 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/UploadFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/UploadFormField.class.php @@ -69,7 +69,9 @@ class UploadFormField extends AbstractFormField { $uploadField = new UploadField($this->getPrefixedId()); $uploadField->maxFiles = $this->getMaximum(); $uploadField->setImageOnly($this->isImageOnly()); - $uploadField->setAllowSvgImage($this->svgImageAllowed()); + if ($this->isImageOnly()) { + $uploadField->setAllowSvgImage($this->svgImageAllowed()); + } return $uploadField; } -- 2.20.1