taxjar / taxjar-magento2-extension

Magento 2 Sales Tax Extension by TaxJar
http://www.taxjar.com/guides/integrations/magento2/
Open Software License 3.0
22 stars 29 forks source link

Unable to save customers with certain TJ fields null #375

Open snoop0x7b opened 2 months ago

snoop0x7b commented 2 months ago

Prerequisites

Description

When saving customers if the tj_exemption_regions or tj_last_sync are null, we get the following PHP errors. This occcurs on Magento 2.4.6-P5 and PHP 8.2. This did not occur on PHP7.4 for us.

Call to a member function getValue() on null at vendor/taxjar/module-taxjar/Observer/Customer/Save.php:57

Call to a member function getValue() on null in vendor/taxjar/module-taxjar/Observer/Customer/Save.php:80

Steps to Reproduce

  1. Go edit a customer
  2. Make sure the last sync date and exempt regions are null.
  3. Save the customer

Expected Result

Editing the customer should be successful

Actual Result

PHP error - customer does not save.

Versions

Magento 2.4.6-p5