[BUGFIX] Fix several typos in php comments
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Classes / Domain / Finishers / DeleteUploadsFinisher.php
index 46af398..5bea3fd 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-declare(strict_types=1);
+declare(strict_types = 1);
 namespace TYPO3\CMS\Form\Domain\Finishers;
 
 /*
@@ -19,7 +19,7 @@ use TYPO3\CMS\Extbase\Domain\Model\FileReference;
 use TYPO3\CMS\Form\Domain\Model\FormElements\FileUpload;
 
 /**
- * This finisher remove the submited files.
+ * This finisher remove the submitted files.
  * Use this e.g after the email finisher if you don't want
  * to keep the files online.
  *
@@ -31,8 +31,6 @@ class DeleteUploadsFinisher extends AbstractFinisher
     /**
      * Executes this finisher
      * @see AbstractFinisher::execute()
-     *
-     * @return void
      */
     protected function executeInternal()
     {
@@ -51,7 +49,7 @@ class DeleteUploadsFinisher extends AbstractFinisher
             if ($file instanceof FileReference) {
                 $file = $file->getOriginalResource();
             }
-            $file->getStorage()->deleteFile($file);
+            $file->getStorage()->deleteFile($file->getOriginalFile());
         }
     }
 }