mpdf icon indicating copy to clipboard operation
mpdf copied to clipboard

Nesting a table inside a tfoot element results in "Trying to access array offset on null"

Open JeppeKnockaert opened this issue 1 year ago • 1 comments

Guidelines

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>');

JeppeKnockaert avatar May 02 '24 13:05 JeppeKnockaert

Same here with PHP 7.4 and mPDF 8.2.4, but the bug comes when a simple td is set in tfoot > tr.

j-willette avatar Oct 20 '25 06:10 j-willette