Bug #50802
closedFolderBasedFileCollection::loadContents() doesn't check if folder is present
100%
Description
in FolderBasedFileCollection::loadContents() there is no check if the folder object is present this can result in a fatal error.
Call to a member function getFiles() on a non-object in typo3/sysext/core/Classes/Resource/Collection/FolderBasedFileCollection.php on line 73
*example usage:
/** @var $fileCollection \TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection */ $fileCollection = $this->fileCollectionRepository->findByUid($this->getUid()); $fileCollection->loadContents(); $this->assets = $fileCollection->getItems();
There is no way to check if the initialization of the object was successful so you currently can not prevent the error.
Fix:
Check in FolderBasedFileCollection::loadContents() if $this->folder is initialized.
Updated by Gerrit Code Review over 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22829
Updated by Ernesto Baschny over 11 years ago
- Category set to File Abstraction Layer (FAL)
Updated by Gerrit Code Review about 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22829
Updated by Gerrit Code Review about 11 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22829
Updated by Gerrit Code Review about 11 years ago
Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/24781
Updated by Gerrit Code Review about 11 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/24782
Updated by Frans Saris about 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 85d0653dbdfd2f414dc50e3a8de57b72aa72d341.