[BUGFIX] Ensure html tag is showing lang and dir attribute 75/58075/3
authorBenni Mack <benni@typo3.org>
Thu, 30 Aug 2018 05:41:50 +0000 (07:41 +0200)
committerBenni Mack <benni@typo3.org>
Thu, 30 Aug 2018 07:06:25 +0000 (09:06 +0200)
Due to some refactorings while achieving notice-free tests,
the check for adding html-tag attributes was changed.

Resolves: #86009
Related: #85849
Releases: master
Change-Id: Ic64c7e8c709d7a7f4d72aef52a9f84ed30660005
Reviewed-on: https://review.typo3.org/58075
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/frontend/Classes/Http/RequestHandler.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php

index c82ff87..f00faf9 100644 (file)
@@ -330,8 +330,8 @@ class RequestHandler implements RequestHandlerInterface, PsrRequestHandlerInterf
             $pageRenderer->setXmlPrologAndDocType(implode(LF, $docTypeParts));
         }
         // Begin header section:
-        if (isset($controller->config['config']['htmlTag_setParams']) && $controller->config['config']['htmlTag_setParams'] !== 'none') {
-            $_attr = $controller->config['config']['htmlTag_setParams'] ?: GeneralUtility::implodeAttributes($htmlTagAttributes);
+        if (($controller->config['config']['htmlTag_setParams'] ?? '') !== 'none') {
+            $_attr = $controller->config['config']['htmlTag_setParams'] ?? GeneralUtility::implodeAttributes($htmlTagAttributes);
         } else {
             $_attr = '';
         }
index 1f2ee47..81b55c3 100644 (file)
@@ -223,8 +223,8 @@ class PageGenerator
             $pageRenderer->setXmlPrologAndDocType(implode(LF, $docTypeParts));
         }
         // Begin header section:
-        if (isset($tsfe->config['config']['htmlTag_setParams']) && $tsfe->config['config']['htmlTag_setParams'] !== 'none') {
-            $_attr = $tsfe->config['config']['htmlTag_setParams'] ?: GeneralUtility::implodeAttributes($htmlTagAttributes);
+        if (($tsfe->config['config']['htmlTag_setParams'] ?? '') !== 'none') {
+            $_attr = $tsfe->config['config']['htmlTag_setParams'] ?? GeneralUtility::implodeAttributes($htmlTagAttributes);
         } else {
             $_attr = '';
         }