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...
Updated by Georg Ringer over 4 years ago
- Related to Task #89113: Cleanup Constant Parsing added
Updated by Georg Ringer over 4 years ago
- Assignee set to Georg Ringer
- Target version set to 10 LTS
Updated by Gerrit Code Review over 4 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64089
Updated by Gerrit Code Review over 4 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64089
Updated by Georg Ringer over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 52959b6ddaba8104d3bece4685b3eae9990749fb.
Actions