Skip to content

Commit

Permalink
[BUGFIX] Account for files without file extension
Browse files Browse the repository at this point in the history
`pathinfo()` won't return the `extension` array item if a file doesn't have a file extension.
  • Loading branch information
s2b authored Jan 8, 2025
1 parent 53c1b2e commit 28205b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Lib/Fileinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected function setFileInformations($file)
'file' => $file->getName(),
'filebody' => $file->getNameWithoutExtension(),
'fileext' => $file->getExtension(),
'realFileext' => $pathInfo['extension'],
'realFileext' => $pathInfo['extension'] ?? '',
'atime' => $file->getCreationTime(),
// We want to make sure that we re-index files which have been modified without FAL noticing it
// (e. g. an upload via FTP and not in the TYPO3 backend). So we are using the mtime from the
Expand Down

0 comments on commit 28205b0

Please sign in to comment.