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

Core: Error handler (FE): PHP Warning: Undefined array key 0 / -1 - PHP 8+ issue? #246

Open
medarob opened this issue Oct 4, 2024 · 1 comment
Assignees

Comments

@medarob
Copy link

medarob commented Oct 4, 2024

Describe the bug
After updating from PHP 7.4 to 8.2.20 we got various PHP warnings regarding TCPDF (6.7.5) in the log. Never noticed this before.

Core: Error handler (FE): PHP Warning: Undefined array key 0 in /var/www/typo3/vendor/tecnickcom/tcpdf/tcpdf.php line 20750
Core: Error handler (FE): PHP Warning: Undefined array key -1 in /var/www/typo3/vendor/tecnickcom/tcpdf/tcpdf.php line 20606
Core: Error handler (FE): PHP Warning: Undefined array key 0 in /var/www/typo3/vendor/tecnickcom/tcpdf/tcpdf.php line 19235

Environment
TYPO3 version(s): TYPO3 11.5.38
pdfviewhelpers version: 3.0.0

Steps to reproduce
Warning noticed after installing PHP 8 but I won't rule out another issue.

Possible solution
There exist a newer version of TCPDF (https://github.com/tecnickcom/tc-lib-pdf) which seems to be (more) compatible with PHP 8.0+ and I wonder if pdfviewhelpers can be changed/updated to use the newer version?

@maechler
Copy link
Member

maechler commented Oct 4, 2024

@medarob Thanks for the detailed report! Since pdfviewhelpers v3 we do not include TCPDF directly in the extension anymore for composer installations. We just have it as a dependency and you should be able to update the TCPDF library yourself with composer.

Could you test if updating TCPDF fixes the issue?

For TER installations we still ship the TCPDF library, but I think it‘s with an even older version. We could update this upon request.

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