Set array-key to the fileID
authorCyperghost <olaf_schmitz_1@t-online.de>
Wed, 26 Jun 2024 08:38:43 +0000 (10:38 +0200)
committerCyperghost <olaf_schmitz_1@t-online.de>
Wed, 26 Jun 2024 08:38:43 +0000 (10:38 +0200)
wcfsetup/install/files/lib/system/form/builder/field/FileProcessorFormField.class.php

index a35bf4fa20b3a77adff289be17f2d287abef03aa..ed6e4a8f6f0174f3706c8d08e022fa93ab8df01e 100644 (file)
@@ -123,7 +123,7 @@ final class FileProcessorFormField extends AbstractFormField
         if ($this->isSingleFileUpload()) {
             $file = new File($value);
             if ($file->fileID === $value) {
-                $this->files = [$file];
+                $this->files = [$file->fileID => $file];
                 $fileIDs[] = $value;
             } else {
                 $value = null;