JustCarmen/fancy_treeview_pdf

FTV PDF and PHP 7.2 not works

mpwt opened this issue · 2 comments

mpwt commented

Hi, I have tested the FTV PDF 1.7.9.1 and MPDF 6.1.0 (bundle) with PHP 7.2 and it not works. I receive an error messagein the website logs:

/home/bauschaf/webtrees_ffp/modules_v3/fancy_treeview_pdf/mpdf/classes/ttfontsuni.php:613 count(): Parameter must be an array or an object that implements Countable #0 /modules_v3/fancy_treeview_pdf/mpdf/classes/ttfontsuni.php:613 ErrorException("count(): Parameter must be an array or an object that implements Countable") #1 /modules_v3/fancy_treeview_pdf/mpdf/classes/ttfontsuni.php:202 extractInfo(false, true, 0) #2 /modules_v3/fancy_treeview_pdf/mpdf/mpdf.php:3880 getMetrics('/home/bauschaf/webtrees_ffp/mo…', 'dejavuserifcondensed', 0, false, true, 0) #3 /modules_v3/fancy_treeview_pdf/mpdf/mpdf.php:4246 AddFont('dejavuserifcondensed', '') #4 /modules_v3/fancy_treeview_pdf/mpdf/mpdf.php:13621 SetFont('dejavuserifcondensed') #5 /modules_v3/fancy_treeview_pdf/mpdf/mpdf.php:1287 SetDefaultFont('serif') #6 /modules_v3/fancy_treeview_pdf/app/Template/PdfTemplate.php:50 __construct() #7 /modules_v3/fancy_treeview_pdf/module.php:127 pageBody() #8 /module.php:26 modAction('write_pdf')

I see that you changed the code in 1.8.0-dev for use with PHP 7.2 but with MPDF 7.0 or 7.1 it not works too. In the webtrees website logs aren't error messages.

I use webtrees 1.7.10 and it would be great to use your addon again with PHP 7.2. I think there is a problem with the integration of mpdf.

Best regards
Martin

I have just released a new version with an updated Mpdf library. This should solve your issue.

The library works with Php 7.2. I've tested it with Php 7.2.4 without any issue.

mpwt commented

Thank you very much. It works fine again.