[BUGFIX] Unable to edit file metadata 45/43945/2
authorNicole Cordes <typo3@cordes.co>
Fri, 9 Oct 2015 17:02:16 +0000 (19:02 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 9 Oct 2015 19:16:30 +0000 (21:16 +0200)
This patch adjusts the handling of the file field after FormEngine
processing.

Resolves: #70553
Releases: master
Change-Id: Ie201c7df5ac74a95c3549430bfdea6835b4f4656
Reviewed-on: http://review.typo3.org/43945
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Resource/Hook/FileInfoHook.php

index c5ad4b4..c2cf8d3 100644 (file)
@@ -48,8 +48,8 @@ class FileInfoHook
     {
         $fileMetadataRecord = $propertyArray['row'];
         $fileObject = null;
-        if ($fileMetadataRecord['file'] > 0) {
-            $fileObject = ResourceFactory::getInstance()->getFileObject((int)$fileMetadataRecord['file']);
+        if (!empty($fileMetadataRecord['file']) && $fileMetadataRecord['file'][0] > 0) {
+            $fileObject = ResourceFactory::getInstance()->getFileObject((int)$fileMetadataRecord['file'][0]);
         }
 
         return $this->renderFileInformationContent($fileObject);