Fixing undefined offset error in writeHTML() when last DOM element has display:none (#496)

Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
This commit is contained in:
Indrek Haav 2022-08-12 10:37:37 +03:00 committed by GitHub
parent a089447257
commit ff83da807a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17370,6 +17370,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
++$key;
}
}
if ($key == $maxel) break;
if ($dom[$key]['tag'] AND isset($dom[$key]['attribute']['pagebreak'])) {
// check for pagebreak
if (($dom[$key]['attribute']['pagebreak'] == 'true') OR ($dom[$key]['attribute']['pagebreak'] == 'left') OR ($dom[$key]['attribute']['pagebreak'] == 'right')) {