[BUGFIX] Fix PHP 8.0 issues in EXT:info
authorOliver Bartsch <bo@cedev.de>
Thu, 17 Jun 2021 12:12:07 +0000 (14:12 +0200)
committerOliver Bartsch <bo@cedev.de>
Fri, 18 Jun 2021 08:29:26 +0000 (10:29 +0200)
One warning was triggered by an inline JavaScript
assignment, which is unused since at least v9. It's
therefore removed.

Resolves: #94364
Releases: master
Change-Id: I8c680d393ce7449be17e68757aa1bc8698360667
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69511
Tested-by: core-ci <typo3@b13.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Jochen <rothjochen@gmail.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Jochen <rothjochen@gmail.com>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
typo3/sysext/info/Classes/Controller/InfoPageTyposcriptConfigController.php
typo3/sysext/info/Classes/Controller/TranslationStatusController.php

index 8bb782a..c315fad 100644 (file)
@@ -378,7 +378,7 @@ class InfoPageTyposcriptConfigController
                 $line['lines'] = '';
             }
             $lines[] = $line;
-            $lines = $this->getList($pageArray[$identifier . '.'], $lines, $pageDepth + 1);
+            $lines = $this->getList($pageArray[$identifier . '.'] ?? [], $lines, $pageDepth + 1);
         }
         return $lines;
     }
index 92304f6..bf5362a 100644 (file)
@@ -185,7 +185,6 @@ class TranslationStatusController
         $titleLen = $this->getBackendUser()->uc['titleLen'];
         // Put together the TREE:
         $output = '';
-        $newOL_js = [];
         $langRecUids = [];
 
         $userTsConfig = $this->getBackendUser()->getTSConfig();
@@ -295,13 +294,6 @@ class TranslationStatusController
                         $info = '<div class="btn-group"><label class="btn btn-default btn-checkbox">';
                         $info .= '<input type="checkbox" data-lang="' . $languageId . '" data-uid="' . (int)$data['row']['uid'] . '" name="newOL[' . $languageId . '][' . $data['row']['uid'] . ']" value="1" />';
                         $info .= '<span class="t3-icon fa"></span></label></div>';
-                        $newOL_js[$languageId] .=
-                            ' +(document.webinfoForm['
-                            . GeneralUtility::quoteJSvalue('newOL[' . $languageId . '][' . $data['row']['uid'] . ']')
-                            . '].checked ? '
-                            . GeneralUtility::quoteJSvalue('&edit[pages][' . $data['row']['uid'] . ']=new')
-                            . ' : \'\')'
-                        ;
                         $tCells[] = '<td class="' . $status . ' col-border-left">&nbsp;</td>';
                         $tCells[] = '<td class="' . $status . '">&nbsp;</td>';
                         $tCells[] = '<td class="' . $status . '">' . $info . '</td>';
@@ -349,7 +341,7 @@ class TranslationStatusController
                 // Title:
                 $headerCells[] = '<th class="col-border-left">' . htmlspecialchars($siteLanguage->getTitle()) . '</th>';
                 // Edit language overlay records:
-                if (is_array($langRecUids[$languageId])) {
+                if (is_array($langRecUids[$languageId] ?? null)) {
                     $editUrl = (string)$this->uriBuilder->buildUriFromRoute('record_edit', [
                         'edit' => [
                             'pages' => [