Use `getObjectProperty()` instead of `getId()` in `UplodFormField`
authorMatthias Schmidt <gravatronics@live.com>
Sun, 31 Mar 2019 13:31:29 +0000 (15:31 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 31 Mar 2019 13:31:29 +0000 (15:31 +0200)
See #2509
See #2825

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

index ffba0d462f5ee7016ef677a84150872717555b34..821ea4495db2e2ec299101844d98b9e407e75d5b 100644 (file)
@@ -235,8 +235,8 @@ class UploadFormField extends AbstractFormField {
                parent::populate();
                
                $this->getDocument()->getDataHandler()->add(new CustomFormFieldDataProcessor('upload', function(IFormDocument $document, array $parameters) {
-                       $parameters[$this->getId()] = $this->getValue();
-                       $parameters[$this->getId() . '_removedFiles'] = $this->getRemovedFiles(true);
+                       $parameters[$this->getObjectProperty()] = $this->getValue();
+                       $parameters[$this->getObjectProperty() . '_removedFiles'] = $this->getRemovedFiles(true);
                        
                        return $parameters;
                }));