-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better handle when user does not have PHP 5.3+ #3
Comments
MillerMedia
added a commit
to MillerMedia/taxjar-woocommerce-plugin
that referenced
this issue
Aug 30, 2023
Receiving this error in a WPEngine hosting environment. We do not know what triggered it but we did see that sometimes $this->nexus can be null in this function in certain instances. Added a simply null check: Error Details ============= An error of type E_ERROR was caused in line 24 of the file /nas/content/live/oursite/wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/class-wc-taxjar-nexus.php. Error message: Uncaught TypeError: count(): Argument taxjar#1 ($value) must be of type Countable|array, null given in /nas/content/live/oursite/wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/class-wc-taxjar-nexus.php:24 Stack trace: #0 /nas/content/live/oursite/wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/class-taxjar-settings.php(330): WC_Taxjar_Nexus->get_form_settings_field() taxjar#1 /nas/content/live/oursite/wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/class-taxjar-settings.php(208): TaxJar_Settings::get_nexus_settings_display() taxjar#2 /nas/content/live/oursite/wp-content/plugins/taxjar-simplified-taxes-for-woocommerce/includes/class-taxjar-settings.php(645): TaxJar_Settings::get_settings() taxjar#3 /nas/content/live/oursite/wp-includes/class-wp-hook.php(310): TaxJar_Settings::save('') taxjar#4 /nas/content/live/oursite/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters('', Array) taxjar#5 /nas/content/live/oursite/wp-includes/plugin.php(517): WP_Hook->do_action(Array) taxjar#6 /nas/content/live/oursite/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-settings.php(77): do_action('woocommerce_set...') taxjar#7 /nas/content/live/oursite/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php(153): WC_Admin_Settings::save() taxjar#8 /nas/content/live/oursite/wp-includes/class-wp-hook.php(310): WC_Admin_Menus->save_settings('') taxjar#9 /nas/content/live/oursite/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array) taxjar#10 /nas/content/live/oursite/wp-includes/plugin.php(517): WP_Hook->do_action(Array) taxjar#11 /nas/content/live/oursite/wp-settings.php(654): do_action('wp_loaded') taxjar#12 /nas/content/live/oursite/wp-config.php(121): require_once('/nas/content/li...') taxjar#13 /nas/content/live/oursite/wp-load.php(50): require_once('/nas/content/li...') taxjar#14 /nas/content/live/oursite/wp-admin/admin.php(34): require_once('/nas/content/li...') taxjar#15 {main} thrown
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TaxJar now requires PHP 5.3+ installed, and WordPress/WooCommerce recommend even newer PHP as well under the "WooCommerce->System Status" report.
Can we fail to initialize the plugin to avoid breaking their checkout when the wrong PHP is installed?
The text was updated successfully, but these errors were encountered: