After an upgrade to PHP 7.0 I started seeing this message in my Watchdog log:

Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; mPDF has a deprecated constructor in require_once() (line 34 of /home/user/public_html/sites/all/modules/print/print_pdf/lib_handlers/print_pdf_mpdf/print_pdf_mpdf.pages.inc).

This is the line of code:

require_once(DRUPAL_ROOT . '/' . $pdf_tool[1]);

Can anyone suggest a fix?

Comments

sah62 created an issue. See original summary.

sah62’s picture

An upgrade to mPDF 7 seems to have fixed this issue.

Anonymous’s picture

Status: Active » Closed (works as designed)

Closing the issue as the OP said updating the library fixed the issue.

Clemence.Blazy’s picture

This problem is still currently on. Even with the latest versions of print module (7.x-2.x-dev) and mpdf library (7.x-2.6).
Any idea how to solve this? I just can't do with the bug and the big red message...
Thanks !