[BUGFIX] FILES.folder does not work 16/25016/2
authorStefan Froemken <froemken@gmail.com>
Sat, 26 Oct 2013 13:58:27 +0000 (15:58 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Thu, 14 Nov 2013 21:02:42 +0000 (22:02 +0100)
cObject IMAGE was executed with empty values
because given key contains filenames instead of
numbers

Resolves: #45724
Releases: 6.2, 6.1, 6.0
Change-Id: I5582b63080b7e6124c3780a8430efb410876a662
Reviewed-on: https://review.typo3.org/25016
Reviewed-by: Gernot Ploiner
Tested-by: Gernot Ploiner
Reviewed-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/frontend/Classes/ContentObject/FilesContentObject.php

index 57cd322..5d0e482 100644 (file)
@@ -138,7 +138,7 @@ class FilesContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractConte
                                        try {
                                                $folder = $this->getFileFactory()->getFolderObjectFromCombinedIdentifier($folderIdentifier);
                                                if ($folder instanceof \TYPO3\CMS\Core\Resource\Folder) {
-                                                       $this->addToArray($folder->getFiles(), $fileObjects);
+                                                       $this->addToArray(array_values($folder->getFiles()), $fileObjects);
                                                }
                                        } catch (\TYPO3\CMS\Core\Resource\Exception $e) {
                                                /** @var \TYPO3\CMS\Core\Log\Logger $logger */