Enabling PHP 8.1 and bugs in two stores with storefront theme
-
The error only occurs in stores with storefront theme (two stores). In the other three stores based on a different theme, if you enable PHP 8. 1, this error does not occur.
2022-11-29T15:34:33+00:00 CRITICAL Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /***/***/***/wp-includes/class-wp-hook.php:293 Stack trace: #0 /***/***/***/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', NULL) #1 /***/***/***/wp-includes/plugin.php(565): WP_Hook->do_action(NULL) #2 /***/***/***/wp-cron.php(188): do_action_ref_array('wp_privacy_dele...', NULL) #3 {main} thrown w /***/***/***/wp-includes/class-wp-hook.php w linii 293 2022-11-29T16:34:01+00:00 CRITICAL Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /***/***/***/wp-includes/class-wp-hook.php:293 Stack trace: #0 /***/***/***/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', NULL) #1 /***/***/***/wp-includes/plugin.php(565): WP_Hook->do_action(NULL) #2 /***/***/***/wp-cron.php(188): do_action_ref_array('wp_privacy_dele...', NULL) #3 {main} thrown w /***/***/***/wp-includes/class-wp-hook.php w linii 293
After checking in cron every hour there is an operation: wp_privacy_delete_old_export_files, Maybe it causes a problem, but there’s no way to do anything about it.
All plugins, themes… are the latest versions.
-
Hi @maxwww
Thanks for reaching out!
I understand that you are receiving the error message above when you upgraded to PHP 8.1 and the default Storefront theme is active, is that correct?
I’d like to understand your site properly, can you please share your System Status Report, that will help us further troubleshoot.
You can find it via
WooCommerce > Status
. SelectGet system report
and thenCopy for support
. Once you’ve done that, you can paste it into your reply here.Thanks!
-
This reply was modified 2 years, 3 months ago by
xue28 (woo-hc).
### WordPress Environment ### WordPress address (URL): *** Site address (URL): *** WC Version: 7.1.0 REST API Version: ? 7.1.0 WC Blocks Version: ? 8.7.5 Action Scheduler Version: ? 3.5.3 Log Directory Writable: ? WP Version: 6.1.1 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: ? Language: pl_PL External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 8.1.6 PHP Post Max Size: 130 MB PHP Time Limit: 165 PHP Max Input Vars: 16000 cURL Version: 7.64.0 OpenSSL/1.1.1n SUHOSIN Installed: – MySQL Version: 5.7.40-log Max Upload Size: 128 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 7.1.0 WC Database Prefix: swp_ Ca?kowity rozmiar bazy danych: 32.51MB Rozmiar bazy danych: 20.99MB Rozmiar indeksu bazy danych: 11.52MB swp_woocommerce_sessions: Dane: 0.06MB + Indeks: 0.02MB + Silnik InnoDB swp_woocommerce_api_keys: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_woocommerce_attribute_taxonomies: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_woocommerce_downloadable_product_permissions: Dane: 0.02MB + Indeks: 0.06MB + Silnik InnoDB swp_woocommerce_order_items: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_woocommerce_order_itemmeta: Dane: 0.05MB + Indeks: 0.03MB + Silnik InnoDB swp_woocommerce_tax_rates: Dane: 0.02MB + Indeks: 0.06MB + Silnik InnoDB swp_woocommerce_tax_rate_locations: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_woocommerce_shipping_zones: Dane: 0.02MB + Indeks: 0.00MB + Silnik InnoDB swp_woocommerce_shipping_zone_locations: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_woocommerce_shipping_zone_methods: Dane: 0.02MB + Indeks: 0.00MB + Silnik InnoDB swp_woocommerce_payment_tokens: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_woocommerce_payment_tokenmeta: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_woocommerce_log: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_actionscheduler_actions: Dane: 0.11MB + Indeks: 0.13MB + Silnik InnoDB swp_actionscheduler_claims: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_actionscheduler_groups: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_actionscheduler_logs: Dane: 0.08MB + Indeks: 0.03MB + Silnik InnoDB swp_commentmeta: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_comments: Dane: 0.02MB + Indeks: 0.09MB + Silnik InnoDB swp_cptch_images: Dane: 0.02MB + Indeks: 0.00MB + Silnik InnoDB swp_cptch_packages: Dane: 0.02MB + Indeks: 0.00MB + Silnik InnoDB swp_cptch_responses: Dane: 0.02MB + Indeks: 0.00MB + Silnik InnoDB swp_links: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_automations: Dane: 0.02MB + Indeks: 0.00MB + Silnik InnoDB swp_mailpoet_automation_runs: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_automation_run_logs: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_automation_triggers: Dane: 0.02MB + Indeks: 0.00MB + Silnik InnoDB swp_mailpoet_automation_versions: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_custom_fields: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_dynamic_segment_filters: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_feature_flags: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_forms: Dane: 0.02MB + Indeks: 0.00MB + Silnik InnoDB swp_mailpoet_log: Dane: 0.02MB + Indeks: 0.00MB + Silnik InnoDB swp_mailpoet_mapping_to_external_entities: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_migrations: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_newsletters: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_mailpoet_newsletter_links: Dane: 0.02MB + Indeks: 0.05MB + Silnik InnoDB swp_mailpoet_newsletter_option: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_newsletter_option_fields: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_newsletter_posts: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_newsletter_segment: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_newsletter_templates: Dane: 2.52MB + Indeks: 0.00MB + Silnik InnoDB swp_mailpoet_scheduled_tasks: Dane: 0.25MB + Indeks: 0.25MB + Silnik InnoDB swp_mailpoet_scheduled_task_subscribers: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_segments: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_mailpoet_sending_queues: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_mailpoet_settings: Dane: 0.05MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_statistics_bounces: Dane: 0.02MB + Indeks: 0.00MB + Silnik InnoDB swp_mailpoet_statistics_clicks: Dane: 0.02MB + Indeks: 0.06MB + Silnik InnoDB swp_mailpoet_statistics_forms: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_statistics_newsletters: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_mailpoet_statistics_opens: Dane: 0.02MB + Indeks: 0.09MB + Silnik InnoDB swp_mailpoet_statistics_unsubscribes: Dane: 0.02MB + Indeks: 0.06MB + Silnik InnoDB swp_mailpoet_statistics_woocommerce_purchases: Dane: 0.02MB + Indeks: 0.06MB + Silnik InnoDB swp_mailpoet_stats_notifications: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_mailpoet_subscribers: Dane: 0.02MB + Indeks: 0.13MB + Silnik InnoDB swp_mailpoet_subscriber_custom_field: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_subscriber_ips: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_subscriber_segment: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_mailpoet_subscriber_tag: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_mailpoet_tags: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_user_agents: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_mailpoet_user_flags: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_options: Dane: 3.45MB + Indeks: 0.53MB + Silnik InnoDB swp_postmeta: Dane: 7.52MB + Indeks: 6.02MB + Silnik InnoDB swp_posts: Dane: 2.52MB + Indeks: 0.83MB + Silnik InnoDB swp_redirection_404: Dane: 0.08MB + Indeks: 0.05MB + Silnik InnoDB swp_redirection_groups: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_redirection_items: Dane: 1.52MB + Indeks: 0.56MB + Silnik InnoDB swp_redirection_logs: Dane: 0.02MB + Indeks: 0.05MB + Silnik InnoDB swp_termmeta: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_terms: Dane: 0.05MB + Indeks: 0.03MB + Silnik InnoDB swp_term_relationships: Dane: 0.33MB + Indeks: 0.19MB + Silnik InnoDB swp_term_taxonomy: Dane: 0.05MB + Indeks: 0.03MB + Silnik InnoDB swp_tm_taskmeta: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_tm_tasks: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_usermeta: Dane: 0.05MB + Indeks: 0.03MB + Silnik InnoDB swp_users: Dane: 0.02MB + Indeks: 0.05MB + Silnik InnoDB swp_wcpdf_invoice_number: Dane: 0.02MB + Indeks: 0.00MB + Silnik InnoDB swp_wcpdf_packing_slip_number: Dane: 0.02MB + Indeks: 0.00MB + Silnik InnoDB swp_wc_admin_notes: Dane: 0.08MB + Indeks: 0.00MB + Silnik InnoDB swp_wc_admin_note_actions: Dane: 0.05MB + Indeks: 0.02MB + Silnik InnoDB swp_wc_category_lookup: Dane: 0.02MB + Indeks: 0.00MB + Silnik InnoDB swp_wc_customer_lookup: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_wc_download_log: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_wc_order_coupon_lookup: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_wc_order_product_lookup: Dane: 0.02MB + Indeks: 0.06MB + Silnik InnoDB swp_wc_order_stats: Dane: 0.02MB + Indeks: 0.05MB + Silnik InnoDB swp_wc_order_tax_lookup: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB swp_wc_product_attributes_lookup: Dane: 0.13MB + Indeks: 0.09MB + Silnik InnoDB swp_wc_product_download_directories: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_wc_product_meta_lookup: Dane: 0.23MB + Indeks: 0.42MB + Silnik InnoDB swp_wc_rate_limits: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_wc_reserved_stock: Dane: 0.02MB + Indeks: 0.00MB + Silnik InnoDB swp_wc_tax_rate_classes: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_wc_webhooks: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_wpmailsmtp_debug_events: Dane: 0.02MB + Indeks: 0.00MB + Silnik InnoDB swp_wpmailsmtp_tasks_meta: Dane: 0.02MB + Indeks: 0.00MB + Silnik InnoDB swp_yasr_log: Dane: 0.11MB + Indeks: 0.05MB + Silnik InnoDB swp_yasr_log_multi_set: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_yasr_multi_set: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_yasr_multi_set_fields: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_yasr_multi_values: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_yith_wcwl: Dane: 0.02MB + Indeks: 0.02MB + Silnik InnoDB swp_yith_wcwl_lists: Dane: 0.02MB + Indeks: 0.03MB + Silnik InnoDB ### Post Type Counts ### attachment: 625 custom_css: 2 customize_changeset: 20 mailpoet_page: 1 ml-slider: 1 nav_menu_item: 73 page: 15 post: 40 product: 547 product_variation: 1928 revision: 15 shipment: 125 watermark: 1 wp_global_styles: 1 wysijap: 1 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (28) ### Yet Another Stars Rating: przez Dario Curvino – 3.1.5 Add to All: przez Ajay D'Souza – 1.8.0 Apaczka.pl WooCommerce: przez Inspire Labs – 1.4.5 Captcha by BestWebSoft: przez BestWebSoft – 5.1.7 Cookie Notice & Compliance dla RODO / CCPA: przez Hu-manity.co – 2.4.2 Custom Taxonomy Order: przez Marcel Pol – 3.4.4 Easy Table of Contents: przez Magazine3 – 2.0.39 Easy Watermark: przez BracketSpace – 1.0.11 ELEX Dynamic Pricing and Discounts for WooCommerce Basic Version: przez ELEXtensions – 1.2.9 Flexible Shipping: przez Octolize – 4.17.0 MailPoet: przez MailPoet – 4.1.0 Advanced Cron Scheduler: przez Sayan Datta – 1.0.9 Mobile Menu: przez Freshlight Lab – 2.8.2.7 Redirection: przez John Godley – 5.3.5 SEO SIMPLE PACK: przez LOOS,Inc. – 3.1.2 Change Storefront Footer Copyright Text: przez QuadLayers – 1.2.1 Tawk.to Live Chat: przez Tawkto – 0.7.2 UpdraftPlus - Kopia/przywracanie: przez UpdraftPlus.Com DavidAnderson – 1.22.23 WooCommerce Active Payments: przez WP Desk – 3.7.2 PDF Invoices & Packing Slips for WooCommerce: przez WP Overnight – 3.2.5 Remove SKU From Product detail page: przez Prem Tiwari – 1.3.3 WooCommerce: przez Automattic – 7.1.0 WP Mail SMTP: przez WPForms – 3.6.1 WP-Optimize - Clean, Compress, Cache: przez David Anderson Ruhani Rabin Team Updraft – 3.2.9 WPFront Notification Bar: przez Syam Mohan – 3.2.0 WPS Hide Login: przez WPServeur NicolasKulka wpformation – 1.9.6 WPS ograniczenie logowania: przez WPServeur NicolasKulka wpformation – 1.5.6 YITH WooCommerce Wishlist: przez YITH – 3.15.0 ### Inactive Plugins (0) ### ### Dropin Plugins (1) ### advanced-cache.php: advanced-cache.php ### Settings ### API Enabled: ? Force SSL: – Currency: PLN (z?) Currency Position: right_space 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 WooCommerce.com: – Enforce Approved Product Download Directories: – ### WC Pages ### Strona sklepu: #4 - / Koszyk: #5 - /koszyk/ Zamówienie: #6 - /zamowienie/ Moje konto: #4680 - /moje-konto/ Regulamin: #114 - /regulamin/ ### Theme ### Name: Storefront Version: 4.2.0 Author URL: https://woocommerce.com/ Child Theme: ? – Je?li modyfikujesz WooCommerce lub motyw nadrz?dny którego nie jeste? autorem polecamy u?ywanie motywu potomnego. Zobacz: Jak tworzy? motywy potomne WooCommerce Support: ? ### Templates ### Overrides: – ### Admin ### Enabled Features: activity-panels analytics coupons customer-effort-score-tracks experimental-products-task experimental-import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing multichannel-marketing mobile-app-banner navigation onboarding onboarding-tasks 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: minified-js new-product-management-experience settings Daily Cron: ? Next scheduled: 2022-12-02 23:13:12 +01:00 Options: ? Notes: 77 Onboarding: completed ### Action Scheduler ### Complete: 204 Oldest: 2022-11-20 22:52:27 +0100 Newest: 2022-12-02 13:46:12 +0100 Failed: 16 Oldest: 2022-12-01 16:20:48 +0100 Newest: 2022-12-02 13:10:55 +0100 Pending: 17 Oldest: 2022-12-02 14:28:03 +0100 Newest: 2022-12-07 21:32:04 +0100 ### Status report information ### Generated at: 2022-12-02 13:46:58 +01:00
The 16 bugs in Scheduled Actions are: wc_admin_unsnooze_admin_notes
The store is based on: Storefront Version: 4.2.0
Problems started after enabling php 8.1
Hello @maxwww,
Checking these error logs, they don’t seem to be coming from WooCommerce or Storefront directly. This directory is from WordPress core
wp-includes/class-wp-hook.php
.I tried updating 2 of my test sites to PHP
8.1.9
just in case this was a bug we were not aware of but failed to replicate the problem.I will recommend you perform a full conflict test by:
?- Temporarily switch your theme to Storefront
- Disable all plugins except for WooCommerce
- Repeat the action that is causing the problem
If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.
Let us know how it goes.
I have already done tests in the meantime and it turns out that the error is only in the Polish version of WooCommerce, even on other templates. The problem can also be caused by the plugin. I have a lot of tests to do.
Hi @maxwww
I’d also recommend cloning your site to a staging environment and performing the tests described on this guide without modifying your live site or impacting customers. Many hosts provide staging facilities, so it’s worth checking in with them. It’s also possible to do it using the free WP Staging plugin.
If this was caused by a third-party plugin present on your site, it would be best to reach out to the developers for further assistance here.
Let us know how it goes!
-
This reply was modified 2 years, 3 months ago by
- The topic ‘Enabling PHP 8.1 and bugs in two stores with storefront theme’ is closed to new replies.