Project

General

Profile

Actions

Bug #60773

closed

Fatal error: Call to a member function getName() on a non-object in typo3/sysext/core/Classes/Resource/ResourceStorage.php on line 1377`

Added by Frank Nägler over 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2014-08-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

this happens, because \TYPO3\CMS\Core\Resource\ResourceFactory::findByStorageAndIdentifier can return null, which is returned by \TYPO3\CMS\Core\Resource\ResourceFactory::getFileObjectByStorageAndIdentifier in line 410 in.

the return annotation of getFileObjectByStorageAndIdentifier is also wrong current value is return File|ProcessedFile but this should be return null|File|ProcessedFile

I think adding a check like if ($fileObject instanceof \TYPO3\CMS\Core\Resource\AbstractFile) { is the best way to fix it.

a hint from Helmut Hummel:
if getFilesInFolder should be able to return processed files, then this needs indeed to be fixed, as any old processed file (present in fs but not in db) will cause a fatal

Actions

Also available in: Atom PDF