Project

General

Profile

Actions

Bug #102396

closed

InputLinkElement fails parsing nullable fields

Added by Henrik Elsner 6 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2023-11-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Error:
`PHP Runtime Deprecation Notice: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/vendor/typo3/cms-backend/Classes/Form/Element/InputLinkElement.php line 231`

We have a TCA config which involves a link along with the eval => null.
See full config, that can be used within styleguide Extension:

'input_29' => [
    'exclude' => 1,
    'label' => 'input_29',
    'description' => 'renderType=inputLink',
    'config' => [
        'type' => 'input',
        'renderType' => 'inputLink',
        'eval' => 'null',
        'default' => null,
    ],
],
Actions #1

Updated by Henrik Elsner 6 months ago

I just found out that the whole class got replaced by the new LinkElement on main.
There the type casting is already done at the according place.
What's missing is the backport for the old version with the string type casting to prevent this bug I guess.

Actions #2

Updated by Gerrit Code Review 6 months ago

  • Status changed from New to Under Review

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81802

Actions #3

Updated by Oliver Bartsch 6 months ago

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

Also available in: Atom PDF