From: Joshua Rüsweg Date: Sun, 20 Jan 2019 21:37:01 +0000 (+0100) Subject: Set object property to null X-Git-Tag: 5.2.0_Alpha_1~296^2~27 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e60987a37fa2d611ea626a4b8f1a582e7e9d4884;p=GitHub%2FWoltLab%2FWCF.git Set object property to null See #2825 --- 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 6b98265fee..40d625c58f 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 @@ -58,6 +58,7 @@ class UploadFormField extends AbstractFormField { $uploadField = new UploadField($this->getId()); $uploadField->maxFiles = $this->getMaximum(); $uploadField->setImageOnly($this->isImageOnly()); + $uploadField->setAllowSvgImages($this->isImageOnly()); return $uploadField; } @@ -76,9 +77,18 @@ class UploadFormField extends AbstractFormField { * @return UploadFile[] */ public function getValue() { + $this->registerField(); + return UploadHandler::getInstance()->getFilesByFieldId($this->getId()); } + /** + * @inheritDoc + */ + public function getObjectProperty() { + return null; + } + /** * @inheritDoc */ @@ -181,7 +191,7 @@ class UploadFormField extends AbstractFormField { /** * Sets the imageOnly flag for this field. * - * @param boolean $imageOnly maximum field value + * @param boolean $imageOnly * @return static this field */ public function imageOnly($imageOnly = true) {