Project

General

Profile

Actions

Bug #98352

closed

Undefined array key "doktype" in PHP 8 Typo3 11.5.16

Added by Tomas Havner over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
Start date:
2022-09-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

Hi,

If the top-page is directly under the root and password-protected, it will create a warning in PHP8:
PHP Warning: Undefined array key "doktype" in /var/www/typo3_src-11.5.16/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php line 1137
$isSpacerOrSysfolder = $this->page['doktype'] PageRepository::DOKTYPE_SPACER || $this->page['doktype'] PageRepository::DOKTYPE_SYSFOLDER;
In this scenario $this->page is empty and $this->page['doktype'] not defined.
$isSpacerOrSysfolder = ($this->page['doktype'] ?? '') PageRepository::DOKTYPE_SPACER || ($this->page['doktype'] ?? '') PageRepository::DOKTYPE_SYSFOLDER; fixes this.
There is the same problem in line 1166 and 1180.

Kind regards
Tomas

Actions #1

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75746

Actions #2

Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75746

Actions #3

Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75746

Actions #4

Updated by Stefan Bürk over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Gerrit Code Review over 1 year ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75751

Actions #6

Updated by Stefan Bürk over 1 year ago

  • Status changed from Under Review to Resolved
Actions #7

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF