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'.
Updated by Gerrit Code Review over 4 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64997
Updated by Gerrit Code Review over 4 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64997
Updated by Gerrit Code Review over 4 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64997
Updated by Gerrit Code Review over 4 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65000
Updated by Johannes Schlier over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 25871186d0aa045792c6db12de7bd171691bcd73.