Set object property to null
authorJoshua Rüsweg <josh@bastelstu.be>
Sun, 20 Jan 2019 21:37:01 +0000 (22:37 +0100)
committerJoshua Rüsweg <josh@bastelstu.be>
Sun, 20 Jan 2019 21:37:01 +0000 (22:37 +0100)
See #2825

wcfsetup/install/files/lib/system/form/builder/field/UploadFormField.class.php

index 6b98265fee65ecb8c6186763ae7751476d270404..40d625c58f805cc56eea0087fbc6ddce8c1b567c 100644 (file)
@@ -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) {