Skip to content

Unable to save customers with certain TJ fields null #375

@snoop0x7b

Description

@snoop0x7b

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

  • Magento 2.4

  • Magento 2.3

  • Magento Open Source (fka Magento 2 Community Edition)

  • Adobe Commerce (fka Magento 2 Enterprise Edition)

  • PHP 8.2

  • PHP 8.1

  • PHP 7.4

  • PHP 7.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions