Project

General

Profile

Actions

Bug #91749

closed

Null passed to new RTE transformTextForPersistence method, resulting in a PHP error

Added by Johannes Schlier almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Start date:
2020-07-06
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Yes
Sprint Focus:

Description

The two new methods in the RteHtmlParser that replace RTE_transform use typed parameters. This means that a PHP error is thrown when passing 'null' to this method.

This method is called in one spot within the core: DataHandler->checkValueForText() (line 1817)
Normally this method receives a string, but can also receive 'null' in at least the following case:

A record has an RTE field without a value in it.
This results in a null value in the database - the default empty case when using the "TEXT" type in MySql.
When opening and saving this record normally this is no problem and handled correctly.

If the field is not shown however, but simply passed, the null value is not handled.
This happens when the record is translated and the RTE field is set to 'l10n_mode' => 'exclude'.

Actions

Also available in: Atom PDF