From 28205b0c21c62d5d4393752631f056daeaec8f28 Mon Sep 17 00:00:00 2001 From: Simon Praetorius Date: Wed, 8 Jan 2025 12:05:30 +0100 Subject: [PATCH] [BUGFIX] Account for files without file extension `pathinfo()` won't return the `extension` array item if a file doesn't have a file extension. --- Classes/Lib/Fileinfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Lib/Fileinfo.php b/Classes/Lib/Fileinfo.php index e449c3bb5..a8b806895 100644 --- a/Classes/Lib/Fileinfo.php +++ b/Classes/Lib/Fileinfo.php @@ -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