spipu / html2pdf

OFFICIAL PROJECT | HTML to PDF converter written in PHP
http://html2pdf.fr/en/default
Open Software License 3.0
1.67k stars 747 forks source link

Error in 5.2.8 - Trying to access array offset on null PHP8.3.6 #797

Open C1977 opened 4 months ago

C1977 commented 4 months ago

Hello, this morning we updated from 5.2.5 to newest 5.2.8. due to error:

"Creation of dynamic property Spipu\Html2Pdf\Html2Pdf::$_pdfa is deprecated" in /html2pdf-5.2.5/spipu/html2pdf/src/Html2Pdf.ph

after we upgraded PHP8.1.28 to PHP8.3. But now we get: "Trying to access array offset on null" in /html2pdf-5.2.8/spipu/html2pdf/src/Parsing/Css.ph

Can you help? PHP Version 8.3.6, Ubuntu 22.04.4 LTS

Thanks in advance C.Funke

C1977 commented 4 months ago

Look like in line 1251 in Css.php there are missing isset() if ($this->value['border']['l']['width']) { [..] } This problem does not exists in older versions. I made a workaround adding 8 times issets