Issue Bug Closed

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

Stephan Großberndt 09/08/21, 12:28 updated 10/04/22, 14:12

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)
    {

Reviews 2

History 25

  1. Gerrit Code Review pushed patch set 1 for master to change 70970 status In Progress Under Review 09/08/21, 14:38

  2. Gerrit Code Review pushed patch set 2 for master to change 70970 10/11/21, 10:18

  3. Gerrit Code Review pushed patch set 1 for 10.4 to change 71572 10/12/21, 10:33

  4. Stephan Großberndt commented and changed status Under Review Resolved done 0 % 100 % 10/12/21, 10:35

    Applied in changeset commit:80fa617487337a55562b96b6f7e816f5984f03b4.

  5. Benni Mack changed status Resolved Closed 10/04/22, 14:12