#92287After upgrading to ver. 9.5.21 uploading of pdf files causes an exception
Description
Until version 9.5.20 in sysext/core/Classes/Resource/Index/Indexer.php, method extractRequiredMetaData there was a check to verify if uploaded file was an Image:
if ($fileObject->getType() == File::FILETYPE_IMAGE && $this->storage->getDriverType() === 'Local') {
The new check introduced in ver. 9.5.21
if ($this->storage->getDriverType() === 'Local' && GeneralUtility::inList(strtolower($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] ?? ''), $fileObject->getExtension())) {
assumes pdf as image files (due to imagefile_ext …).
This causes wrong value for metadata and throws the exception.
Then: or we remove “.pdf” from Default Configuration $GLOBALS[‘TYPO3_CONF_VARS’][‘GFX’][‘imagefile_ext’] or we have to revert to old “if ($fileObject->getType() == File::FILETYPE_IMAGE”