Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array
-
hi, since the recent updates to 8.0.0 and 8.0.1 we now get this error when running stripe. Knocking it back to 7.9 fixes it so unsure what to do
An error of type E_ERROR was caused in line 661 of the file /var/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-gateway-stripe.php. Error message: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in /var/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-gateway-stripe.php:661
Thanks
-
Hey there, @gwdwp! Thanks for contacting us. I’m happy to help you.
Can you please follow the steps below to get more detailed logs so we can take a look?
- Go to WooCommerce > Settings > Payments > Stripe > Settings > Enable Log error messages > Save the changes
- Then try to make a test order to generate logs
- Go to WooCommerce > Status > Logs and use the selector to search for Stripe logs
- Also please search for fatal error logs there
- You can copy all errors and post it on https://gist.github.com/ then please share the link here.
Furthermore, I’d like to understand your site properly. Please share with us the System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support.
Looking forward to your reply.
Have a wonderful day!
Hi, thanks so much for the help.
Do you mean to do these steps with the current working plugin or the new one 8.0.1?
If I activate the new one the entire site goes into crash mode that’s all so i can’t do those tasks.The full error log it emails me upon crash is…
the site is running the latest versions of all plugins and neve as the parent theme
PHP version 8.0.30
Error Details
=============
An error of type E_ERROR was caused in line 661 of the file /var/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-gateway-stripe.php. Error message: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in /var/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-gateway-stripe.php:661
Stack trace:
#0 /var/www/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-gateway-stripe.php(661): array_keys(NULL)
#1 /var/www/wp-includes/class-wp-hook.php(324): WC_Gateway_Stripe->reorder_available_payment_gateways(NULL)
#2 /var/www/wp-includes/plugin.php(205): WP_Hook->apply_filters(NULL, Array)
#3 /var/www/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(333): apply_filters('woocommerce_ava...', Array)
#4 /var/www/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Payments.php(93): WC_Payment_Gateways->get_available_payment_gateways()
#5 /var/www/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/Payments.php(71): Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks\Payments::has_gateways()
#6 /var/www/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/WooCommercePayments.php(118): Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks\Payments->is_complete()
#7 /var/www/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php(304): Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks\WooCommercePayments->can_view()
#8 [internal function]: Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskList->Automattic\WooCommerce\Admin\Features\OnboardingTasks\{closure}(Object(Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks\WooCommercePayments))
#9 /var/www/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php(305): array_filter(Array, Object(Closure))
#10 /var/www/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php(239): Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskList->get_viewable_tasks()
#11 /var/www/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php(410): Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskList->is_complete()
#12 /var/www/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php(432): Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskLists::setup_tasks_remaining()
#13 /var/www/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskLists::menu_task_count('')
#14 /var/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#15 /var/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#16 /var/www/wp-admin/includes/menu.php(161): do_action('admin_menu', '')
#17 /var/www/wp-admin/menu.php(417): require_once('/var/www/wp-adm...')
#18 /var/www/wp-admin/admin.php(158): require('/var/www/wp-adm...')
#19 /var/www/wp-admin/update-core.php(10): require_once('/var/www/wp-adm...')
#20 {main}
? thrown` WordPress Environment WC Version: 8.6.1 REST API Version: ? 8.6.1 WC Blocks Version: ? 11.8.0-dev Action Scheduler Version: ? 3.7.1 Log Directory Writable: ? WP Version: 6.4.3 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ? Language: en_US External object cache: – Server Environment Server Info: Apache PHP Version: 8.0.30 PHP Post Max Size: 100 MB PHP Time Limit: 300 PHP Max Input Vars: 10000 cURL Version: 8.5.0 OpenSSL/3.1.4 SUHOSIN Installed: – MySQL Version: 8.0.33-25 Max Upload Size: 100 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? Database ars_rules: 1 attachment: 236 customize_changeset: 7 e-landing-page: 1 elementor_library: 1 nav_menu_item: 1 neve_product_tabs: 3 neve_thank_you: 1 page: 9 post: 3 product: 160 revision: 385 seedprod: 1 shop_coupon: 1 shop_order: 2137 shop_order_refund: 16 Security Secure connection (HTTPS): ? Hide errors from visitors: ? Active Plugins (14) Reserve Stock for WooCommerce: by Addify – 1.1.0 WooCommerce Delivery & Pickup Date Time Pro: by CodeRockz – 1.4.28 Coming Soon Page, Maintenance Mode, Landing Pages & WordPress Website Builder by SeedProd: by SeedProd – 6.15.23 Elementor: by Elementor.com – 3.20.1 Smash Balloon Instagram Feed: by Smash Balloon – 6.2.9 Missed Scheduled Posts Publisher by WPBeginner: by WPBeginner – 2.0.0 Neve Pro Addon: by ThemeIsle – 2.8.4 Sparks for WooCommerce: by – 1.1.5 Sucuri Security - Auditing, Malware Scanner and Hardening: by Sucuri Inc. – 1.8.42 WooCommerce Stripe Gateway: by WooCommerce – 7.9.3 Google Analytics for WooCommerce: by WooCommerce – 2.0.3 WooCommerce: by Automattic – 8.6.1 WP Mail SMTP: by WP Mail SMTP – 4.0.1 Custom Product Tabs for WooCommerce: by Code Parrots – 1.8.5 Inactive Plugins (2) Akismet Anti-spam: Spam Protection: by Automattic - Anti-spam Team – 5.3.1 PayPal Zettle POS: by PayPal – 1.5.7 Dropin Plugins (2) db-error.php: db-error.php object-cache.php: object-cache.php Must Use Plugins (2) Object Cache Pro (MU): by Rhubarb Group – 1.18.2 System Plugin: by – 4.115.0 Settings API Enabled: – Force SSL: – Currency: GBP (£) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to Woo.com: – Enforce Approved Product Download Directories: ? HPOS feature screen enabled: – HPOS feature enabled: – Order datastore: WC_Order_Data_Store_CPT HPOS data sync enabled: – WC Pages Shop base: #49 - /shop/ Cart: #50 - /cart/ Checkout: #51 - /checkout/ My account: #52 - /my-account/ Terms and conditions: #406 - /terms-and-conditions/ Theme Name: HK Version: 1.0.0 Child Theme: ? Parent Theme Name: Neve Parent Theme Version: 3.8.3 Parent Theme Author URL: https://themeisle.com WooCommerce Support: ? Templates Overrides: hidden-kitchen/woocommerce/emails/email-header.php neve/woocommerce/product-searchform.php Admin Enabled Features: activity-panels analytics product-block-editor coupons core-profiler customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks product-variation-management product-virtual-downloadable product-external-affiliate product-grouped product-linked remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page Disabled Features: customize-store minified-js new-product-management-experience product-pre-publish-modal settings async-product-editor-category-field Daily Cron: ? Next scheduled: 2024-03-15 12:36:10 +00:00 Options: ? Notes: 12 Onboarding: completed Action Scheduler Complete: 1,407 Oldest: 2024-02-13 06:04:53 +0000 Newest: 2024-03-14 13:58:55 +0000 Failed: 1 Oldest: 2023-09-28 20:15:43 +0100 Newest: 2023-09-28 20:15:43 +0100 Pending: 3 Oldest: 2024-03-15 08:47:26 +0000 Newest: 2024-03-19 13:27:00 +0000 Status report information Generated at: 2024-03-14 14:15:54 +00:00 `
Hi @gwdwp,
Thanks for sharing more details on this.
I understand that updating the plugin to the latest version leads to your site crashing.
Upon checking your SSR, I was unable to notice any possible issues, however, could you please try deactivating all other plugins, only leaving WooCommerce and the WooCommerce Stripe Gateway plugin then try updating the plugin and see if the site still crashes.
Let us know how it goes.
We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.
- The topic ‘Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array’ is closed to new replies.