Bug #91749
closedNull passed to new RTE transformTextForPersistence method, resulting in a PHP error
100%
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'.