dompdf icon indicating copy to clipboard operation
dompdf copied to clipboard

Call to a member function hasAttribute() on bool

Open c1am opened this issue 3 years ago • 1 comments

This error is happening from the TreeBuilder.php file of dompdf. I believe this is because of malformed HTML of some sort. Is there any way for me to check? I haven't been able to find a suitable validator that takes a large amount of HTML.

c1am avatar Jun 24 '22 17:06 c1am

You can try disabling HTML5 parsing for versions prior to 2.0.0. Though I wouldn't recommend that as a long-term solution.

We just released Dompdf 2.0.0 that utilizes masterminds/html5-php. You might try upgrading to see if the issue is resolved with the updated release.

bsweeney avatar Jun 24 '22 17:06 bsweeney