Actions
Bug #95984
closedError in constants-editor for integer constants without defined range
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2021-11-15
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Currently there seems to be a problem with the constants manager.
Lets say we have some integer constant defined:
# customsubcategory=example=Some Category # cat=some constants/example/100; type=int; label=A really nice integer const.dyingInteger =
After hitting save, we will receive this error message:
Changing the constant to an "int+" or an "int[0-100]" its working.
# cat=some constants/example/100; type=int+; label=A really nice integer const.workingInteger = # cat=some constants/example/100; type=int[0-100]; label=A really nice integer const.anotherWorkingInteger =
The docs clearly say, the range is an optional parameter (https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/UsingSetting/TheConstantEditor.html#type).
So I think there is no check if the parameter is set, but you must set one at the moment.
Files
Updated by Thomas Anders about 3 years ago
I'm not sure if that is a good practice inside the core, but the error can easily be fixed by:
public/typo3/sysext/core/Classes/TypoScript/TypoScriptService.php
// changing line:1190
// from:
if ($typeDat['paramstr']) {...}
//to
if (!empty($typeDat['paramstr'])) {...}
Updated by Thomas Anders about 3 years ago
I see - it is already fixed in latest master
if ($typeDat['paramstr'] ?? false) {...}
so - this could be closed
Updated by Oliver Hader about 3 years ago
- Related to Bug #95945: Undefined array key warning in ExtendedTemplateService added
Updated by Oliver Hader about 3 years ago
- Status changed from New to Closed
Thanks for reporting this. As you figured already, it has been addressed in issue #95945 in c1a6410daf1cbfa0bf913e6c2e995a107041931b
Actions