[BUGFIX] Check if file exists for backend logo 48/56748/2
authorLidia Demin <typecat@gmx.net>
Thu, 19 Apr 2018 08:33:08 +0000 (10:33 +0200)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Thu, 19 Apr 2018 21:21:22 +0000 (23:21 +0200)
If an invalid file path is given, an exception is thrown if trying to
access its properties and the backend is not accessible any more.
Check if file exists before accessing. If not use default.

Resolves #84791
Releases: master, 8.7

Change-Id: Ide4c58dd03cbad1ed06ad66f558d170cd2170482
Reviewed-on: https://review.typo3.org/56748
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
typo3/sysext/backend/Classes/Controller/BackendController.php

index 541a1d5..8d690c1 100644 (file)
@@ -401,7 +401,7 @@ class BackendController
             }
         }
         // if no custom logo was set or the path is invalid, use the original one
-        if (empty($logoPath)) {
+        if (empty($logoPath) || !file_exists($logoPath)) {
             $logoPath = GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Public/Images/typo3_logo_orange.svg');
             $logoWidth = 22;
             $logoHeight = 22;