Actions
Bug #95149
closedExistingTargetFileNameException is never thrown in TYPO3\CMS\Core\Resource\ResourceStorage::sanitizeFileName()
Status:
Closed
Priority:
Should have
Assignee:
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2021-09-08
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:
Description
PHPDoc mentions two Exceptions which are never thrown in code and misses the only exception which may actually be thrown in LocalDriver: InvalidFileNameException
/**
* Clean a fileName from not allowed characters
*
* @param string $fileName The name of the file to be add, If not set, the local file name is used
* @param Folder $targetFolder The target folder where the file should be added
*
* @throws \InvalidArgumentException
* @throws Exception\ExistingTargetFileNameException
* @return string
*/
public function sanitizeFileName($fileName, Folder $targetFolder = null)
{
Actions