Closed miguelangelss4 closed 1 year ago
Just ran into this issue updating to PHP8.1.
Changing the count()
parentheses fixed the issue for me, didn't lock up anything.
I don't continue with this project. PDFMerger gived me a lot of errors in php 8.1 so I decided develop this project in c# with net core
Hello, I'm having issues wit pdf files that are working with 1.5 of pdf. Theese files worked with the original pdf merger by Jarrod Nettles, but I need it in newer PHP version.
Personajes_TXT.pdf is the only file that works fine. The other ones, fails in lib\PDFMerger\tcpdf\tcpdi.php 503line:
} elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1] >= 2))) {
that I changed to:
} elseif (($key == '/Index') AND ($v[0] == PDF_TYPE_ARRAY AND count($v[1]) >= 2)) {
because php crashed by passing bool to count() function (seems like parenthesis typo mistake in the lib). But after this change, the lib only blocks itself, by consuming all memory available.