fkrauthan / wp-mpdf

Print WordPress posts as PDF. Optional with Geshi highlighting.
55 stars 23 forks source link

PHP 8.0 compatibility issues #26

Closed Archie22is closed 1 year ago

Archie22is commented 1 year ago

Good day sir.

I was just checking to see if all is well with PHP 8.0. I'm getting the following error whenever I update to PHP 8.1. and I can't quite seem to point out the issue. I understand you are one busy man, maybe share with us your to-do list and we will assist.

Error:

Fatal error: Uncaught Mpdf\MpdfException: Data has already been sent to output (/usr/www/users/mintopfwbf/wp-content/themes/jobboard_v2/admin/framework/autoload.php at line 162), unable to output PDF file in /usr/www/users/mintopfwbf/wp-content/plugins/wp-mpdf/vendor/mpdf/mpdf/src/Mpdf.php:9549 Stack trace: #0 /usr/www/users/mintopfwbf/wp-content/plugins/wp-mpdf/wp-mpdf.php(293): Mpdf\Mpdf->Output('manthako.pdf', 'I') #1 /usr/www/users/mintopfwbf/wp-content/plugins/wp-mpdf/wp-mpdf.php(504): mpdf_output(' apply_filters(NULL, Array) #4 /usr/www/users/mintopfwbf/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #5 /usr/www/users/mintopfwbf/wp-includes/template-loader.php(13): do_action('template_redire...') #6 /usr/www/users/mintopfwbf/wp-blog-header.php(19): require_once('/usr/www/users/...') #7 /usr/www/users/mintopfwbf/index.php(17): require('/usr/www/users/...') #8 {main} thrown in /usr/www/users/mintopfwbf/wp-content/plugins/wp-mpdf/vendor/mpdf/mpdf/src/Mpdf.php on line 9549

fkrauthan commented 1 year ago

Hi you need to check your logs of what error (most likely some deprecation) message. You could check if there is a new mpdf version and create a pull request after updating it (and verifying that it still works)

Archie22is commented 1 year ago

Sweet. Thank you @fkrauthan