Project

General

Profile

Actions

Bug #97268

closed

Page Layout without cols does not work with PHP 8.1

Added by Kevin Appelt over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend User Interface
Target version:
Start date:
2022-03-31
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

PHP Runtime Deprecation Notice: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/html/vendor/typo3/cms-core/Classes/Utility/GeneralUtility.php line 935

$result = explode($delimiter, $string) ?: [];

Triggered from /var/www/html/vendor/typo3/cms-backend/Classes/Controller/PageLayoutController.php line 592
$colPosArray = array_unique(GeneralUtility::intExplode(',', $this->colPosList));

The error occurs when the backend layout used does not contain colPos. We use this, for example, to display no colPos in SysFolders, since no content is usually maintained there. TSconfig for the backend layout looks like this:
mod.web_layout.BackendLayouts.empty {
  title = Empty

  config {
    backend_layout {
      colCount = 0
      rowCount = 0
    }
  }
}

The issue seems not to occur in current main, as the effected line was changed as part of a breaking change and does not run into this error.

Actions #1

Updated by Gerrit Code Review over 2 years ago

  • Status changed from New 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/+/74124

Actions #2

Updated by Gerrit Code Review over 2 years ago

Patch set 2 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/+/74124

Actions #3

Updated by Kevin Appelt over 2 years ago

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

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF