Project

General

Profile

Actions

Bug #90900

closed

TypeError: "trim() expects parameter 1 to be string, null given" in ConstantConfigurationParser

Added by Julian Mair over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
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...


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #89113: Cleanup Constant ParsingClosed2019-09-09

Actions
Actions #1

Updated by Georg Ringer over 4 years ago

  • Related to Task #89113: Cleanup Constant Parsing added
Actions #2

Updated by Georg Ringer over 4 years ago

  • Status changed from New to Accepted
Actions #3

Updated by Georg Ringer over 4 years ago

  • Assignee set to Georg Ringer
  • Target version set to 10 LTS
Actions #4

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

Actions #5

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

Actions #6

Updated by Georg Ringer over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF