Skip to content

Commit

Permalink
Added null check to confirm (new) customer objects have an id before …
Browse files Browse the repository at this point in the history
…attempting to use the id. (#520)
  • Loading branch information
keifphos authored Jan 9, 2024
1 parent c33c004 commit d1f3efb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CustomerSaveManager/DefaultCustomerSaveManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ protected function rememberOriginalCustomer(CustomerInterface $customer)
}
}

if (!$originalCustomerNeeded && $this->getSaveOptions()->isNewsletterQueueEnabled()) {
if (!$originalCustomerNeeded && $this->getSaveOptions()->isNewsletterQueueEnabled() && $customer->getId() != null) {
$originalCustomerNeeded = true;
}

Expand Down

0 comments on commit d1f3efb

Please sign in to comment.