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

I've Upgraded my PHP to v7.4.16 .. lots of php Errors in html2pdf #646

Open
Mark-Bestwick opened this issue Mar 25, 2021 · 5 comments
Open

Comments

@Mark-Bestwick
Copy link

Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\inetpub\wwwroot\tester\vendor\tecnickcom\tcpdf\tcpdf.php on line 16893



Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\inetpub\wwwroot\tester\vendor\tecnickcom\tcpdf\tcpdf.php on line 16893



Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\inetpub\wwwroot\tester\vendor\tecnickcom\tcpdf\tcpdf.php on line 16896



Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\inetpub\wwwroot\tester\vendor\tecnickcom\tcpdf\tcpdf.php on line 17778



Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\inetpub\wwwroot\tester\vendor\tecnickcom\tcpdf\include\tcpdf_images.php on line 318



Warning: chr() expects parameter 1 to be int, string given in C:\inetpub\wwwroot\tester\vendor\tecnickcom\tcpdf\include\tcpdf_fonts.php on line 1671



Warning: chr() expects parameter 1 to be int, string given in C:\inetpub\wwwroot\tester\vendor\tecnickcom\tcpdf\include\tcpdf_fonts.php on line 1671

@jhonnymakis
Copy link

Same here, I'm using PHP 8.0

@AR1110
Copy link

AR1110 commented May 5, 2021

igual para mi, no se como pueda solucionar esto

@W0rma
Copy link

W0rma commented May 24, 2021

@Mark-Bestwick The warning is obviously not triggered by spipu/html2pdf but from tecnickcom/tcpdf which is a dependency of this package.

Which version of tecnickcom/tcpdf are you currently using (composer show tecnickcom/tcpdf)?

Version 6.3 should fix the warnings.

@anothersailor
Copy link

anothersailor commented Jun 21, 2021

You can also hack the files:
. In simple_html_dom, find all the regex that contain “-“ and escape the character (“-“). Around lines 682 and 1363
. Find the arrays with indexes {1} and replace them by [1] (I remember 2 occurrences (I think in tcpdf main file)
. In tcpdf/include/tcpdf_fonts line 1666, add a test that returns “” if $c is empty (static function unichr($c, $unicode=true) {if(empty($c) {return “”;}

you can also activate debugging and it will find the locations for you.

@anothersailor
Copy link

Sorry, simple_html_dom is not part of tcpdf.
PS: I have checked TCPDF v6.3 and it does not solve the problems. >> hacking.

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

5 participants