Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #2
sah62 CreditAttribution: sah62 commentedAn upgrade to mPDF 7 seems to have fixed this issue.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous as a volunteer commentedClosing the issue as the OP said updating the library fixed the issue.
Comment #4
Clemence.Blazy CreditAttribution: Clemence.Blazy commentedThis 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 !