Skip to content
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

Update class-wc-taxjar-nexus.php #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 30, 2023

  1. Update class-wc-taxjar-nexus.php

    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
    MillerMedia authored Aug 30, 2023
    Configuration menu
    Copy the full SHA
    e45e7ba View commit details
    Browse the repository at this point in the history