[BUGFIX] Do not try to delete already remove file 92/59192/2
authorHelmut Hummel <typo3@helhum.io>
Mon, 17 Dec 2018 21:33:23 +0000 (22:33 +0100)
committerBenni Mack <benni@typo3.org>
Tue, 18 Dec 2018 07:57:25 +0000 (08:57 +0100)
When using the FAL API to add a file to a folder,
the local file is deleted by default already.

Thus the attempt to remove the file again results in a warning.

Therefore remove the obsolete unlink to avoid the warning.

Resolves: #87192
Releases: 8.7, 9.5, master
Change-Id: I23f3192e2760cd705429337464c8a5506cf41205
Reviewed-on: https://review.typo3.org/59192
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/Resource/OnlineMedia/Helpers/AbstractOnlineMediaHelper.php

index 61fbd9d..7d97210 100644 (file)
@@ -111,7 +111,6 @@ abstract class AbstractOnlineMediaHelper implements OnlineMediaHelperInterface
         $temporaryFile = GeneralUtility::tempnam('online_media');
         GeneralUtility::writeFileToTypo3tempDir($temporaryFile, $onlineMediaId);
         $file = $targetFolder->addFile($temporaryFile, $fileName, DuplicationBehavior::RENAME);
-        GeneralUtility::unlink_tempfile($temporaryFile);
         return $file;
     }