[BUGFIX] Handle that FileLinkHandler:resolveFile() can return null
In the method FileLinkHandler:resolveHandlerData() the call to FileLinkHandler:resolveFile() handles the FileDoesNotExistException correctly. But if it returns null this will lead to a type error. This patch handles the null value properly. Resolves: #104659 Releases: main, 12.4 Change-Id: Iacf3ef8e72d7c18b4b15758da8780d94a9282a96 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/85677 Reviewed-by:Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/core/Classes/LinkHandling/FileLinkHandler.php 2 additions, 3 deletionstypo3/sysext/core/Classes/LinkHandling/FileLinkHandler.php
- typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php 1 addition, 0 deletionstypo3/sysext/core/Classes/Resource/Driver/LocalDriver.php
- typo3/sysext/core/Classes/Resource/ResourceFactory.php 1 addition, 2 deletionstypo3/sysext/core/Classes/Resource/ResourceFactory.php
- typo3/sysext/core/Tests/Functional/LinkHandling/FileLinkHandlerTest.php 72 additions, 0 deletions...ore/Tests/Functional/LinkHandling/FileLinkHandlerTest.php
Please register or sign in to comment