[BUGFIX] EXT:form - fatal on file upload 23/43623/3
authorRalf Zimmermann <ralf.zimmermann@tritum.de>
Tue, 29 Sep 2015 11:43:08 +0000 (13:43 +0200)
committerFrans Saris <franssaris@gmail.com>
Tue, 29 Sep 2015 11:45:50 +0000 (13:45 +0200)
use finfo_file to determine the file mime type

Resolves: #70181
Releases: master
Change-Id: I337205077479d88bf94a4117515b75e8d114728d
Reviewed-on: http://review.typo3.org/43623
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
typo3/sysext/form/Classes/Hooks/HandleIncomingFormValues.php

index d480bf6..baedc00 100644 (file)
@@ -192,7 +192,7 @@ class HandleIncomingFormValues implements SingletonInterface {
                                        $originalFilename = $_FILES['tx_form_form']['name'][$formPrefix][$fieldName][$key];
                                        $size = $_FILES['tx_form_form']['size'][$formPrefix][$fieldName][$key];
                                }
-                               $fileInfo = GeneralUtility::makeInstance(FileInfo::class, $tempFilename);
+                               $fileInfo = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Type\File\FileInfo::class, $tempFilename);
                                return array(
                                                'tempFilename' => $tempFilename,
                                                'originalFilename' => $originalFilename,