Fatal error on new page
-
Hello
PHP Fatal error: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in …/plugins/wp-content/plugins/woocommerce/includes/wc-cart-functions.php:476
This fatal error is triggered in the backend when I try to create a new page.
First of all, why does the code in wc-cart-functions.php run when I try to create a new page? The cart has nothing to do with creating a new page in the backend, so please, don’t slow down the entire backend for anything.Apart from that, on line 476 you have
$new_rates = array_keys( $package['rates'] );
I would first check that $package[‘rates’] is set and that it’s an array before applying array_keys.
This was for your information. I hadn’t time to investigate deeper, and I can’t tell you why it happens, or which plugin give conflicts…, And I will not have the time to investigate deeper. In my case; I solved it in another way, and if you want you can also close this thread. This was for your information. Be aware, that under some conditions WooCommerce triggers that fatal error when you create a new page.
Best regards
Jose
- The topic ‘Fatal error on new page’ is closed to new replies.