Critical error on PDF invoice settings page
-
Hello,
I’m reporting a bug that I saw already before but forgot to report here. When I’m going on the settings page of PDF Invoice I got an empty page we the only message “Critical error with your theme, check your e-mail to see details”.
The details of the error are bellow:
Uncaught TypeError: Unsupported operand types: string + int in src/wp-content/plugins/woocommerce-pdf-invoice/classes/class-pdf-functions-class.php:354 Stack trace: #0 src/wp-content/plugins/woocommerce-pdf-invoice/classes/settings/class-pdf-settings-class.php(249): WC_pdf_functions::get_next_invoice_number() #1 src/wp-includes/class-wp-hook.php(307): WC_pdf_admin_settings::options_page() #2 src/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #3 src/wp-includes/plugin.php(476): WP_Hook->do_action() #4 src/wp-admin/admin.php(259): do_action() #5 {main}
I fixed the issue by myself, changing the incriminated line from
$next_invoice = $current_invoice + 1;
to
$next_invoice = intval($current_invoice) + 1;
But this solution is temporary until the next plugin update… So I hope you could fix that in the source.My configuration:
- PHP: v8.1.6
- Apache: v2.4.38
- WordPress: v6.0
- WooCommerce: v6.5.1
- Woo PDF Invoice plugin: v4.15.5
Thanks for your help!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Critical error on PDF invoice settings page’ is closed to new replies.