Issue Bug Closed

#90863htmlspecialchars() expects parameter 1 to be string, null given

Eckard Gehrke 03/27/20, 20:51 updated 03/27/20, 21:47

Description

Hi
when upgrading from 9.5 to 10.3 I have issues with my form. It is displayed in frontend but in backend I get an error in preview processing:

(1/1) TypeError
htmlspecialchars() expects parameter 1 to be string, null given

in C:\..\typo3\sysext\form\Classes\Hooks\FormPagePreviewRenderer.php line 63 (last shown line).

array &$row
) {
if ($row[‘CType’] === ‘form_formframework’) {
$contentType = $parentObject->CType_labels[$row[‘CType’]];
$itemContent .= $parentObject->linkEditContent(‘<strong>’ . htmlspecialchars($contentType) . ‘</strong>

I guess $contentType is not set.
When I replace in last shown line $contentType with ‘ ‘ then in backend page content is shown again.
Unfortunately I do not know why $contentType is null, if that is an error or the error is that this case was not htought about in above coding. Maybe I have to redo my formsettings? If you need more information on how to reproduce let me know.
Best regards
Eckard

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.