Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
C1977 opened this issue Apr 30, 2024 · 2 comments
Open

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

C1977 opened this issue Apr 30, 2024 · 2 comments

Comments

@C1977
Copy link

C1977 commented Apr 30, 2024

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 C1977 changed the title Error in 5.2.8 - Trying to access array offset on null Error in 5.2.8 - Trying to access array offset on null PHP8.3.6 Apr 30, 2024
@C1977
Copy link
Author

C1977 commented Apr 30, 2024

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

@W0rma
Copy link
Contributor

W0rma commented Dec 3, 2024

I made a workaround adding 8 times issets

@C1977 What are the code places you had to adjust?

Do you plan to create a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants