Project

General

Profile

Actions

Bug #95149

closed

ExistingTargetFileNameException is never thrown in TYPO3\CMS\Core\Resource\ResourceStorage::sanitizeFileName()

Added by Stephan Großberndt about 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
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

Also available in: Atom PDF