Actions
Bug #90900
closedTypeError: "trim() expects parameter 1 to be string, null given" in ConstantConfigurationParser
Start date:
2020-03-31
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
If you add something like such in your constants:
# customcategory=generaldata=Allgemeine Einstellungen general { # cat=generaldata; type=boolean; label= Automatische Sprachweiterleitung aktivieren (im Frontend) lang_redirect_active = 0 }
... then this error occours in the BE Constant Editor/Browser (this worked without problems in v8 and v9):
(1/1) TypeError trim() expects parameter 1 to be string, null given in /var/www/html/httpdocs/typo3/sysext/core/Classes/TypoScript/Parser/ConstantConfigurationParser.php line 296 } if (isset($editableComments[$const])) { $editableComments[$const]['name'] = $const; $editableComments[$const]['value'] = trim($value); $editableComments[$const]['default_value'] = trim($default[$const]); } } return $editableComments; }
if a string conversion like `trim((string)$default[$const]);` is applied, the error disappears...
Actions