WPDevelopers / essential-addons-for-elementor-lite

Essential Addons for Elementor. Ultimate elements library for Elementor.
https://essential-addons.com/elementor/
43 stars 43 forks source link

Fatal error: Uncaught Error: Unsupported operand types #742

Closed omicito closed 2 years ago

omicito commented 2 years ago

Hi!

I am experiencing error: Fatal error: Uncaught Error: Unsupported operand types on checkout page. Error log is:

Fatal error: Uncaught Error: Unsupported operand types in /public_html/wp-content/plugins/essential-addons-for-elementor-lite/includes/Elements/Woo_Checkout.php:2909 Stack trace: #0 /public_html/wp-content/plugins/essential-addons-for-elementor-lite/includes/Elements/Woo_Checkout.php(2916): Essential_Addons_Elementor\Elements\Woo_Checkout->reorder_checkout_fields(Array, 'billing') #1 /public_html/wp-includes/class-wp-hook.php(307): Essential_Addons_Elementor\Elements\Woo_Checkout->ea_checkout_fields(Array) #2 /public_html/wp-includes/plugin.php(191): WP_Hook->apply_filters(Array, Array) #3 /public_html/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(267): apply_filters('woocommerce_che...', Array) #4 /public_html/wp-content/plugins/essential-addons-for-elementor-lite/includes/Template/Woocommerce/Checkout/Woo_Checkout_Helper.php(569): WC_Checkout->get_checkout_fields() #5 /public_html in /public_html/wp-content/plugins/essential-addons-for-elementor-lite/includes/Elements/Woo_Checkout.php on line 2909

The line 2909 is: $fields[$field_key]['class'] = array_diff( $fields[$field_key]['class'], $classes) + [ $field_set['field_class'] ];

I just commented out the 2909 line in Woo_Checkout.php, it is working properly. It looks like $fields[$field_key]['class'] is returning NULL and that is why array_diff() throws the error.

I did not made any changes in functions.php. Also, I tried to downgrade the plugins version, problem remains the same.

Any help would be appreciated.

omicito commented 2 years ago

Looks like the latest update solved the issue...