Details
-
Improvement
-
Resolution: Fixed
-
Medium
-
3.3.5
-
None
-
Ibexa Content
Description
In case of any libxml errors, this line would fail due to potential false value being returned https://github.com/ezsystems/ezplatform-richtext/blob/master/src/bundle/Templating/Twig/Extension/RichTextConverterExtension.php#L62.
Return value of EzSystems\EzPlatformRichTextBundle\Templating\Twig\Extension\RichTextConverterExtension::richTextToHtml5() must be of the type string, bool returned error
Therefore we need to apply a proper check and (if possible) add logging for the specific error that has occurred.
The issue will most likely appear under the following circumstances:
1. libxml2 upgraded to version 2.9.10/2.9.12,
2. an empty RichText field rendered e.g. from CLI:
php -r 'var_dump((new DOMDocument)->saveHTML());'