Project

General

Profile

Actions

Bug #90863

closed

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

Added by Eckard Gehrke about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
Start date:
2020-03-27
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #90598: Initialize emulated PageLayoutView before calling hooksClosed2020-02-29

Actions
Actions

Also available in: Atom PDF