tecnickcom / TCPDF

Official clone of PHP library to generate PDF documents and barcodes
https://tcpdf.org
Other
4.22k stars 1.52k forks source link

With the new update to 6.7.2, the usage of Mutlicell is showing Undefined Array key -1 error with php 8.1 #701

Open Muzammil1234 opened 8 months ago

Muzammil1234 commented 8 months ago

Hi! We are using the php version 8.1 and before the update we were using the tcpdf verison 6.6.5 and it was working like a charm. Now after the update to 6.7.2 its giving exception. I am pasting the stack trace [2024-03-20 11:54:01] local.ERROR: Undefined array key -1 {"exception":"[object] (ErrorException(code: 0): Undefined array key -1 at /var/www/html/vendor/tecnickcom/tcpdf/tcpdf.php:18829) [stacktrace]

0 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(255): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()

https://github.com/tecnickcom/TCPDF/issues/1 /var/www/html/vendor/tecnickcom/tcpdf/tcpdf.php(18829): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap{closure}() https://github.com/tecnickcom/TCPDF/issues/2 /var/www/html/vendor/tecnickcom/tcpdf/tcpdf.php(5934): TCPDF->writeHTML() https://github.com/tecnickcom/TCPDF/issues/3 /var/www/html/app/Exports/PdfGeneration.php(121): TCPDF->MultiCell() https://github.com/tecnickcom/TCPDF/pull/4 /var/www/html/app/Exports/MonthlyBalancePdfExport.php(64): App\Exports\PdfGeneration->addBlankCell() I am using MultiCell to create an empty row. But after the upgrade its not working. Can you help with this? thank you :)