Hi there,
I'm getting this error when trying to view HTML emails on Roundcube 1.6 / PHP 8.1.13. On PHP 7.4 it works fine. Is this a bug or do I need to install or configure something?
Thanks,
Chris
PHP Fatal error: Uncaught Error: Typed property DOMDocument::$documentElement must not be accessed before initialization in /home/chris/projects/roundcube/vendor/masterminds/html5/src/HTML5/Parser/DOMTreeBuilder.php:275
Stack trace:
#0 /home/chris/projects/roundcube/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php(399): Masterminds\HTML5\Parser\DOMTreeBuilder->startTag()
#1 /home/chris/projects/roundcube/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php(141): Masterminds\HTML5\Parser\Tokenizer->tagName()
#2 /home/chris/projects/roundcube/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php(82): Masterminds\HTML5\Parser\Tokenizer->consumeData()
#3 /home/chris/projects/roundcube/vendor/masterminds/html5/src/HTML5.php(161): Masterminds\HTML5\Parser\Tokenizer->parse()
#4 /home/chris/projects/roundcube/vendor/masterminds/html5/src/HTML5.php(89): Masterminds\HTML5->parse()
#5 /home/chris/projects/roundcube/program/lib/Roundcube/rcube_washtml.php(698): Masterminds\HTML5->loadHTML()
#6 /home/chris/projects/roundcube/program/actions/mail/index.php(977): rcube_washtml->wash()
#7 /home/chris/projects/roundcube/program/actions/mail/index.php(1021): rcmail_action_mail_index::wash_html()
#8 /home/chris/projects/roundcube/program/actions/mail/show.php(748): rcmail_action_mail_index::print_body()
#9 /home/chris/projects/roundcube/program/include/rcmail_output_html.php(1484): rcmail_action_mail_show::message_body()
#10 [internal function]: rcmail_output_html->xml_command()
#11 /home/chris/projects/roundcube/program/include/rcmail_output_html.php(1322): preg_replace_callback()
#12 /home/chris/projects/roundcube/program/include/rcmail_output_html.php(825): rcmail_output_html->parse_xml()
#13 /home/chris/projects/roundcube/program/include/rcmail_output_html.php(654): rcmail_output_html->parse()
#14 /home/chris/projects/roundcube/program/actions/mail/show.php(164): rcmail_output_html->send()
#15 /home/chris/projects/roundcube/program/include/rcmail.php(275): rcmail_action_mail_show->run()
#16 /home/chris/projects/roundcube/index.php(278): rcmail->action_handler()
#17 {main}
thrown in /home/chris/projects/roundcube/vendor/masterminds/html5/src/HTML5/Parser/DOMTreeBuilder.php on line 275