Skip to content
Snippets Groups Projects
Commit 73422129 authored by Nikita Hovratov's avatar Nikita Hovratov Committed by Christian Kuhn
Browse files

[BUGFIX] Fix PHP 8 warning in ConstantConfigurationParser

If extension authors don't provide a type for their
extension configuration options, they will now fall
back to "string" and prevent later undefined array
key access warnings.

Resolves: #95977
Releases: master
Change-Id: Icd77c4d130d2fc7d0b4f127dbeb2926c4057b81c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72175


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 98af8fbb
Branches
Tags
No related merge requests found
......@@ -296,6 +296,8 @@ class ConstantConfigurationParser
$editableComments[$const]['name'] = $const;
$editableComments[$const]['value'] = trim($value);
$editableComments[$const]['default_value'] = trim((string)($default[$const] ?? ''));
// If type was not provided, initialize with default value "string".
$editableComments[$const]['type'] ??= 'string';
}
}
return $editableComments;
......
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