Incompatibility with PHP 8.0+
-
We upgraded the Webserver from PHP 7.4 to PHP 8.3 this week and the following error was created:
2024-05-09T08:58:43+00:00 Critical Uncaught TypeError: stripslashes(): Argument #1 ($string) must be of type string, array given in /var/www/clients/client1/web1/web/prod/wp-content/plugins/woocommerce-wholesale-pricing/inc/class-wwp-wholesale-frontend.php:44 Additional context { "error": { "type": 1, "file": "\/var\/www\/clients\/client1\/web1\/web\/prod\/wp-content\/plugins\/woocommerce-wholesale-pricing\/inc\/class-wwp-wholesale-frontend.php", "line": 44 }, "backtrace": [ "", "#0 \/var\/www\/clients\/client1\/web1\/web\/prod\/wp-content\/plugins\/woocommerce-wholesale-pricing\/inc\/class-wwp-wholesale-frontend.php(44): stripslashes()", "#1 \/var\/www\/clients\/client1\/web1\/web\/prod\/wp-includes\/class-wp-hook.php(324): Wwp_Wholesale_Pricing_Frontend->wwp_after_checkout_validation()", "#2 \/var\/www\/clients\/client1\/web1\/web\/prod\/wp-includes\/class-wp-hook.php(348): WP_Hook->apply_filters()", "#3 \/var\/www\/clients\/client1\/web1\/web\/prod\/wp-includes\/plugin.php(517): WP_Hook->do_action()", "#4 \/var\/www\/clients\/client1\/web1\/web\/prod\/wp-content\/plugins\/woocommerce\/includes\/class-wc-checkout.php(961): do_action()", "#5 \/var\/www\/clients\/client1\/web1\/web\/prod\/wp-content\/plugins\/woocommerce\/includes\/class-wc-checkout.php(1257): WC_Checkout->validate_checkout()", "#6 \/var\/www\/clients\/client1\/web1\/web\/prod\/wp-content\/plugins\/woocommerce\/includes\/class-wc-ajax.php(520): WC_Checkout->process_checkout()", "#7 \/var\/www\/clients\/client1\/web1\/web\/prod\/wp-includes\/class-wp-hook.php(324): WC_AJAX::checkout()", "#8 \/var\/www\/clients\/client1\/web1\/web\/prod\/wp-includes\/class-wp-hook.php(348): WP_Hook->apply_filters()", "#9 \/var\/www\/clients\/client1\/web1\/web\/prod\/wp-includes\/plugin.php(517): WP_Hook->do_action()", "#10 \/var\/www\/clients\/client1\/web1\/web\/prod\/wp-content\/plugins\/woocommerce\/includes\/class-wc-ajax.php(96): do_action()", "#11 \/var\/www\/clients\/client1\/web1\/web\/prod\/wp-includes\/class-wp-hook.php(324): WC_AJAX::do_wc_ajax()", "#12 \/var\/www\/clients\/client1\/web1\/web\/prod\/wp-includes\/class-wp-hook.php(348): WP_Hook->apply_filters()", "#13 \/var\/www\/clients\/client1\/web1\/web\/prod\/wp-includes\/plugin.php(517): WP_Hook->do_action()", "#14 \/var\/www\/clients\/client1\/web1\/web\/prod\/wp-includes\/template-loader.php(13): do_action()", "#15 \/var\/www\/clients\/client1\/web1\/web\/prod\/wp-blog-header.php(19): require_once('...')", "#16 \/var\/www\/clients\/client1\/web1\/web\/index.php(17): require('...')", "#17 {main}", "thrown" ] }
Disabling the plugin removed the error.
We reenabled the plugin and went back to PHP 8.0, the error still existed. Going back to PHP 7.4 fixes the problem.
This is a security issue and needs resolving.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.