From f72072cf58fda06660736b73da1aaa0d325e7592 Mon Sep 17 00:00:00 2001
From: Wouter Wolters <typo3@wouterwolters.nl>
Date: Thu, 24 Nov 2016 23:37:17 +0100
Subject: [PATCH] [TASK] addCssInlineBlock function called with too many
 arguments

addCssInlineBlock is called with 5 parameters instead of 4
in PageGenerator. We can safely remove the 5th argument.

Fixed two typos too.

Resolves: #78785
Releases: master
Change-Id: I468345b6792e7103a68858d9d7b59e657d94023a
Reviewed-on: https://review.typo3.org/50770
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
---
 typo3/sysext/frontend/Classes/Page/PageGenerator.php | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/typo3/sysext/frontend/Classes/Page/PageGenerator.php b/typo3/sysext/frontend/Classes/Page/PageGenerator.php
index 2dc32adf2d57..4c5a2c9f6ead 100644
--- a/typo3/sysext/frontend/Classes/Page/PageGenerator.php
+++ b/typo3/sysext/frontend/Classes/Page/PageGenerator.php
@@ -141,7 +141,6 @@ class PageGenerator
             // Checking XHTML-docytpe
             switch ((string)$tsfe->config['config']['xhtmlDoctype']) {
                 case 'xhtml_trans':
-
                 case 'xhtml_strict':
                     $tsfe->xhtmlVersion = 100;
                     break;
@@ -156,7 +155,6 @@ class PageGenerator
                     $tsfe->xhtmlVersion = 105;
                     break;
                 case 'xhtml_11':
-
                 case 'xhtml+rdfa_10':
                     $tsfe->xhtmlVersion = 110;
                     break;
@@ -434,7 +432,7 @@ class PageGenerator
                                 // To fix MSIE 6 that cannot handle these as relative paths (according to Ben v Ende)
                                 $ss = GeneralUtility::dirname(GeneralUtility::getIndpEnv('SCRIPT_NAME')) . '/' . $ss;
                             }
-                            $pageRenderer->addCssInlineBlock('import_' . $key, '@import url("' . htmlspecialchars($ss) . '") ' . htmlspecialchars($cssFileConfig['media']) . ';', empty($cssFileConfig['disableCompression']), (bool)$cssFileConfig['forceOnTop'], '');
+                            $pageRenderer->addCssInlineBlock('import_' . $key, '@import url("' . htmlspecialchars($ss) . '") ' . htmlspecialchars($cssFileConfig['media']) . ';', empty($cssFileConfig['disableCompression']), (bool)$cssFileConfig['forceOnTop']);
                         } else {
                             $pageRenderer->addCssFile(
                                 $ss,
@@ -467,7 +465,7 @@ class PageGenerator
                                 // To fix MSIE 6 that cannot handle these as relative paths (according to Ben v Ende)
                                 $ss = GeneralUtility::dirname(GeneralUtility::getIndpEnv('SCRIPT_NAME')) . '/' . $ss;
                             }
-                            $pageRenderer->addCssInlineBlock('import_' . $key, '@import url("' . htmlspecialchars($ss) . '") ' . htmlspecialchars($cssFileConfig['media']) . ';', empty($cssFileConfig['disableCompression']), (bool)$cssFileConfig['forceOnTop'], '');
+                            $pageRenderer->addCssInlineBlock('import_' . $key, '@import url("' . htmlspecialchars($ss) . '") ' . htmlspecialchars($cssFileConfig['media']) . ';', empty($cssFileConfig['disableCompression']), (bool)$cssFileConfig['forceOnTop']);
                         } else {
                             $pageRenderer->addCssLibrary(
                                 $ss,
@@ -783,7 +781,7 @@ class PageGenerator
             }
         }
         if (!$tsfe->config['config']['removeDefaultJS']) {
-            // inlude default and inlineJS
+            // include default and inlineJS
             if ($scriptJsCode) {
                 $pageRenderer->addJsInlineCode('_scriptCode', $scriptJsCode, $tsfe->config['config']['compressJs']);
             }
@@ -1149,7 +1147,7 @@ class PageGenerator
      * Adds inline CSS code, by respecting the inlineStyle2TempFile option
      *
      * @param string $cssStyles the inline CSS styling
-     * @param bool $excludeFromConcatenation option to see if it should be conctatenated
+     * @param bool $excludeFromConcatenation option to see if it should be concatenated
      * @param string $inlineBlockName the block name to add it
      */
     protected static function addCssToPageRenderer($cssStyles, $excludeFromConcatenation = false, $inlineBlockName = 'TSFEinlineStyle')
-- 
GitLab