Skip to content

Commit

Permalink
[BUGFIX] Fix PHP 8 warning in ConstantConfigurationParser
Browse files Browse the repository at this point in the history
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: core-ci <typo3@b13.com>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
nhovratov authored and lolli42 committed Nov 15, 2021
1 parent 98af8fb commit 7342212
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -296,6 +296,8 @@ public function parseComments($flatSetup, $default = null): array
$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;
Expand Down

0 comments on commit 7342212

Please sign in to comment.