mpdf
mpdf copied to clipboard
Nesting a table inside a tfoot element results in "Trying to access array offset on null"
Guidelines
- [X] I understand that if I fail to adhere to contribution guidelines and/or fail to provide all required details, this issue may be closed without review.
Description of the bug
When nesting a table inside the tfoot of another table, Mpdf the following exception:
Trying to access array offset on null in vendor/mpdf/mpdf/src/Tag/Table.php on line 832.
mPDF version
8.2.3
PHP Version and environment (server type, cli provider etc., enclosing libraries and their respective versions)
PHP 8.3.6
Reproducible PHP+CSS+HTML snippet suffering by the error
(new Mpdf())->WriteHTML('<table><tfoot><tr><td><table><tr><td></td></tr></table></td></tr></tfoot></table>');
Same here with PHP 7.4 and mPDF 8.2.4, but the bug comes when a simple td is set in tfoot > tr.