#108038Error when editing file mount: Call to a member function hasFile() on null
Description
When editing a sys_filemount record that has its identifier set to an non-existing storage, I get a crash with TYPO3 v13.4.19:
(1/1) Error Call to a member function hasFile() on null in /var/www/typo3/vendor/typo3/cms-core/Classes/Resource/ResourceFactory.php line 350 at TYPO3\CMS\Core\Resource\ResourceFactory->getObjectFromCombinedIdentifier() in /var/www/typo3/vendor/typo3/cms-core/Classes/Resource/ResourceFactory.php line 266 at TYPO3\CMS\Core\Resource\ResourceFactory->retrieveFileOrFolderObject() in /var/www/typo3/vendor/typo3/cms-backend/Classes/Form/FormDataProvider/TcaFolder.php line 71 at TYPO3\CMS\Backend\Form\FormDataProvider\TcaFolder->addData() in /var/www/typo3/vendor/typo3/cms-backend/Classes/Form/FormDataGroup/OrderedProviderList.php line 77 at TYPO3\CMS\Backend\Form\FormDataGroup\OrderedProviderList->compile() in /var/www/typo3/vendor/typo3/cms-backend/Classes/Form/FormDataGroup/TcaDatabaseRecord.php line 36 at TYPO3\CMS\Backend\Form\FormDataGroup\TcaDatabaseRecord->compile() in /var/www/typo3/vendor/typo3/cms-backend/Classes/Form/FormDataCompiler.php line 83 at TYPO3\CMS\Backend\Form\FormDataCompiler->compile() in /var/www/typo3/vendor/typo3/cms-backend/Classes/Controller/EditDocumentController.php line 1012 at TYPO3\CMS\Backend\Controller\EditDocumentController->makeEditForm() in /var/www/typo3/vendor/typo3/cms-backend/Classes/Controller/EditDocumentController.php line 884
Steps to reproduce
1. Create file mount in TYPO3, configure it to a storage
2. Delete the storage record or modify the record in database by setting identifier to 23:/ (23 is a non existing storage uid)
3. Edit the file mount in backend’s list view