[BUGFIX] FILES.folder does not work 10/25410/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:03:37 +0000 (22:03 +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/25410
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/frontend/Classes/ContentObject/FilesContentObject.php

index 23f1a0f..3dc7394 100644 (file)
@@ -123,7 +123,7 @@ class FilesContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractConte
                                        try {
                                                $folder = $fileFactory->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 */