Jump to content
TNG Community
JPT

bug with php8 and tng12.3 in PDF code

Recommended Posts

JPT

Hi,

Did you forget to update the PDF Report code to work with PHP 8?

find attached a patch for the {} array problem.
 

but still it doesn't work for me. It doesn't find the fonts.
I am a programmer but languages like PHP and CPP I just don't understand :(

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in /var/www/html/tng-12/tfpdf.php:555 Stack trace: #0 /var/www/html/tng-12/rpt_pedigree.php(29): tFPDF->AddFont() #1 {main} thrown in /var/www/html/tng-12/tfpdf.php on line 555

I was able to workaround the following problem by linking fonts/unifont to tng-root:

Warning: stat(): stat failed for unifont/DejaVuSans/DejaVuSans.ttf in /var/www/html/tng-12/tfpdf.php on line 506
Warning: require_once(unifont/ttfonts.php): Failed to open stream: No such file or directory in /var/www/html/tng-12/tfpdf.php on line 512
Fatal error: Uncaught Error: Failed opening required 'unifont/ttfonts.php' (include_path='.:/usr/share/php') in /var/www/html/tng-12/tfpdf.php:512 Stack trace: #0 /var/www/html/tng-12/rpt_pedigree.php(29): tFPDF->AddFont() #1 {main} thrown in /var/www/html/tng-12/tfpdf.php on line 512

 

pdf.diff

Share this post


Link to post
Share on other sites
Ken Roy

TNG 12.3 was not tested with PHP 8.  See TNG versions article on the TNG Wiki. 

If you want to use PHP 8, you will need to upgrade to the latest TNG v13.1.2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×