Commit 60dab029 authored by Benjamin Franzke's avatar Benjamin Franzke Committed by Richard Haeser

[BUGFIX] Fix TypeError when loginLogoAlt is unset

As of #92628, 'loginLogoAlt' is evaluated when a custom backend
loginLogo has been set, but it is not taken into account if has
not been set at all. Use null coalesce operator to avoid notices
and to avoid throwing TypeErrors because trim() cannot handle null
values.

Resolves: #93275
Related: #92628
Releases: master
Change-Id: I1cd2875f9b92b9d1a86e3817e1623acb45922b85
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67437Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Michael Telgkamp's avatarMichael Telgkamp <michael.telgkamp@mindscreen.de>
Tested-by: default avatarRichard Haeser <richard@richardhaeser.com>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Michael Telgkamp's avatarMichael Telgkamp <michael.telgkamp@mindscreen.de>
Reviewed-by: default avatarRichard Haeser <richard@richardhaeser.com>
parent 4bfe2ade
......@@ -409,7 +409,7 @@ class LoginController implements LoggerAwareInterface
);
} else {
$logo = $extConf['loginLogo'];
$logoAlt = trim($extConf['loginLogoAlt']);
$logoAlt = trim($extConf['loginLogoAlt'] ?? '');
if (empty($logoAlt)) {
trigger_error('Login logo without alt-text is not accessible and will fall back to "TYPO3 CMS logo" in v12. Configure alt-text in the backend extension.', E_USER_DEPRECATED);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment