Issue Bug Closed

#84791EXT:backend: missing file existence check for backend logo

Lidia Demin 04/19/18, 10:29 updated 10/02/18, 10:47

Description

Problem:
If the file given in backendLogo field of EXT:backend is invalid, an exception is thrown:

#1476107295: PHP Warning: getimagesize(/.../typo3conf/ext/bvm_sitepackage/Resources/Public/image/backend-logo.png): failed to open stream: No such file or directory in /.../vendor/typo3/cms/typo3/sysext/core/Classes/Type/File/ImageInfo.php line 58 (More information)

TYPO3\CMS\Core\Error\Exception thrown in file
/.../vendor/typo3/cms/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 107.

The backend is not accessible any more.

Cause:
Such a check is missing in TYPO3\CMS\Backend\Controller::renderTopbar() [L: 405] although it’s described in the comment:

 // if no custom logo was set or the path is invalid, use the original one
if (empty($logoPath)) {

This results in the invalid file path being called instead of using the default file.

ext-backend-logo-field.png

Reviews 2