PHP Fatal error: Uncaught TypeError
-
I have a long term, intermittent, problem. A customer goes to checkout and instead of seeing the checkout page, they get a wordpress error message and are unable to checkout. This happens several times a week.
I enabled debug-log and can see the errors logged at the time the fault is reported.
Today it happened for a while when adding ‘mangrove jacks starter kit’ to the cart. As soon as I enabled error logging on the flexible shipping page, the error vanished, even when I deactivated the flexible shipping error logging.
I think the important line in debug-log is “] PHP Fatal error: Uncaught TypeError: Argument 2 passed to Flexible_Shipping_Plugin::woocommerce_default_shipment_method() must be of the type array, null given, called in /home/aawcomau/public_html/wp-includes/class-wp-hook.php on line 288 and defined in /home/aawcomau/public_html/wp-content/plugins/flexible-shipping/classes/class-flexible-shipping-plugin.php:418”But here’s the full output generated from adding the item to the cart
“[04-Feb-2020 00:33:14 UTC] PHP Warning: array_keys() expects parameter 1 to be array, null given in /home/aawcomau/public_html/wp-content/plugins/woocommerce/includes/wc-cart-functions.php on line 468
[04-Feb-2020 00:33:14 UTC] PHP Warning: array_keys() expects parameter 1 to be array, null given in /home/aawcomau/public_html/wp-content/plugins/woocommerce/includes/wc-cart-functions.php on line 439
[04-Feb-2020 00:33:14 UTC] PHP Warning: current() expects parameter 1 to be array, null given in /home/aawcomau/public_html/wp-content/plugins/woocommerce/includes/wc-cart-functions.php on line 440
[04-Feb-2020 00:33:14 UTC] PHP Fatal error: Uncaught TypeError: Argument 2 passed to Flexible_Shipping_Plugin::woocommerce_default_shipment_method() must be of the type array, null given, called in /home/aawcomau/public_html/wp-includes/class-wp-hook.php on line 288 and defined in /home/aawcomau/public_html/wp-content/plugins/flexible-shipping/classes/class-flexible-shipping-plugin.php:418
Stack trace:
#0 /home/aawcomau/public_html/wp-includes/class-wp-hook.php(288): Flexible_Shipping_Plugin->woocommerce_default_shipment_method(NULL, NULL, false)
#1 /home/aawcomau/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(NULL, Array)
#2 /home/aawcomau/public_html/wp-content/plugins/woocommerce/includes/wc-cart-functions.php(453): apply_filters(‘woocommerce_shi…’, NULL, NULL, false)
#3 /home/aawcomau/public_html/wp-content/plugins/woocommerce/includes/wc-cart-functions.php(417): wc_get_default_shipping_method_for_package(0, Array, false)
#4 /home/aawcomau/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart.php(1290): wc_get_chosen_ in /home/aawcomau/public_html/wp-content/plugins/flexible-shipping/classes/class-flexible-shipping-plugin.php on line 418”Please can you advise me what’s happening? and how I can get it fixed?
thank you
RobThe page I need help with: [log in to see the link]
The topic ‘PHP Fatal error: Uncaught TypeError’ is closed to new replies.