Skip to content
Snippets Groups Projects
Commit 077f123b authored by Achim Fritz's avatar Achim Fritz Committed by Oliver Bartsch
Browse files

[BUGFIX] Prevent undefined array key in new content element wizard

Prevent PHP 8.1 undefined array key for wizard items without
description or without title.

Resolves: #99015
Releases: main, 11.5
Change-Id: I141aa8e0003a2e3b783fb78fddf9db5e602ea40d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76454


Tested-by: default avatarSusanne Moog <look@susi.dev>
Tested-by: default avatarChris Müller <typo3@krue.ml>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarSusanne Moog <look@susi.dev>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
parent 8666aa45
Branches
Tags
No related merge requests found
......@@ -265,8 +265,8 @@ class NewContentElementController
protected function getWizardItem(array $itemConf): array
{
$itemConf['title'] = $this->getLanguageService()->sL($itemConf['title']);
$itemConf['description'] = $this->getLanguageService()->sL($itemConf['description']);
$itemConf['title'] = $this->getLanguageService()->sL($itemConf['title'] ?? '');
$itemConf['description'] = $this->getLanguageService()->sL($itemConf['description'] ?? '');
$itemConf['saveAndClose'] = (bool)($itemConf['saveAndClose'] ?? false);
$itemConf['tt_content_defValues'] = $itemConf['tt_content_defValues.'] ?? [];
unset($itemConf['tt_content_defValues.']);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment