Go to PHP7.1 and MPDF Errors - Odd value found on line 30648

I have been using PHP 5.x and mPDF 6.x for a long time.

This week I decided to upgrade to PHP7.1, but still use mPDF6.

There is a problem before updating.

PROBLEM 1 ::

Console error message: A constructor with the same name as the class name is not recommended.

I look through each php file and find classes, and then replace the constructor function with __construct (...)

PROBLEM 2 ::

Console error message: Cannot assign property identifier $ attr I go to the mPDF.php file in the MergeCSS (...) function. I am adding a new line of code in the third line.

if (empty ($ attr)) {$ attr = array ();}

PROBLEM 3 ::

Console show this this: " " 30648. "

:

  • mPDF- > ConvertSize() mPDF.php MPDF7.

    ConvertSize() ConvertSize() multiplyFontSize();

https://github.com/mpdf/mpdf/blob/development/src/SizeConverter.php

  1. mPDF

const SCALE = 72/25.4;

, .

+4
2

, " ". mpdf 6.1.3 commit.

+2

FYI: PHP7 , switch . mpdf switch.

+1

Source: https://habr.com/ru/post/1677222/


All Articles