[BUGFIX] Ignore empty values for table and uid in FilesContentObject
When using the option "references" as an array, it is possible to provide table and uid with stdWrap functionality. The return type can be mixed so proper casting is necessary. Also, empty values like an empty string for table or "0" for uid should not trigger $pageRepository->getRawRecord and the fallback values should be used instead. Another potential bug was found while adding test cases, where an empty table would result in nothing. In such a case, the current table should be used for relation fetching. Resolves: #96809 Releases: main, 11.5 Change-Id: Ieb90f846bbdafb50190c1d30008aa65e1dbb9e43 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73550 Tested-by:core-ci <typo3@b13.com> Tested-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Oliver Bartsch <bo@cedev.de>
Showing
- typo3/sysext/frontend/Classes/ContentObject/FilesContentObject.php 7 additions, 4 deletions...ext/frontend/Classes/ContentObject/FilesContentObject.php
- typo3/sysext/frontend/Tests/Functional/ContentObject/DataSet/FilesContentObjectDataSet.csv 9 additions, 1 deletion...ional/ContentObject/DataSet/FilesContentObjectDataSet.csv
- typo3/sysext/frontend/Tests/Functional/ContentObject/FilesContentObjectTest.php 138 additions, 2 deletions...Tests/Functional/ContentObject/FilesContentObjectTest.php
Please register or sign in to comment