Issue Bug Closed

#937529.5.25: Uncaught TYPO3 Exception when using FileReference object

Sascha Brümmer 03/16/21, 15:23 updated 05/11/21, 16:00

Description

Problem:
“Uncaught TYPO3 Exception: Class ‘TYPO3\CMS\Core\Resource\GeneralUtility’ not found | Error thrown in file public/typo3/sysext/core/Classes/Resource/FileReference.php in line 532“
when using the FileReference object.

Cause:
Missing `use TYPO3\CMS\Core\Utility\GeneralUtility;` statement.

The statement just seems to be missing in the 9.5.25 version of the file:O
https://github.com/TYPO3/TYPO3.CMS/blob/v9.5.25/typo3/sysext/core/Classes/Resource/FileReference.php#L17

vs.
https://github.com/TYPO3/TYPO3.CMS/blob/10.4/typo3/sysext/core/Classes/Resource/FileReference.php#L19
https://github.com/TYPO3/TYPO3.CMS/blob/11.1/typo3/sysext/core/Classes/Resource/FileReference.php#L19

Reviews 1